Scroll Bar

Scroll bars let a user choose the direction and distance to scroll through information in a related window or list box. The window class name for a scroll bar is "SCROLLBAR".

The contents of the IAccessible properties depends on whether the scroll bar is vertical or horizontal and on which of the following parts of the scroll bar is being queried by the client:

  • The scroll bar itself
  • The top or right arrow button
  • The bottom or left arrow button
  • The scroll box (thumb)
  • The page up or page right region
  • The page down or page left region

Supported Properties and Methods

  • accDoDefaultAction
    The scroll bar object itself and the scroll thumb do not support the DoDefaultAction method.

    For the other scroll bar parts on a vertical scroll bar, DoDefaultAction calls PostMessage with the WM_VSCROLL message with wParam set to the following values.

    Scroll bar part DoDefaultAction
    Top arrow button SB_LINEUP
    Bottom arrow button SB_LINEDOWN
    Page up region SB_PAGEUP
    Page down region SB_PAGEDOWN

    For the other scroll bar parts on a horizontal scroll bar, DoDefaultAction calls PostMessage with the WM_HSCROLL message with wParam set to the following values.

    Scroll bar part DoDefaultAction
    Left arrow button SB_LINELEFT
    Right arrow button SB_LINERIGHT
    Page left region SB_PAGELEFT
    Page right region SB_PAGERIGHT
  • accHitTest
    accLocation
    accNavigate
    get_accChildCount
    The ChildCount property for the scroll bar object is five. For the other scroll bar parts, the ChildCount property is zero.

  • get_accDefaultAction
    The scroll bar object itself and the scroll thumb do not support the DefaultAction property. The DefaultAction property for the arrow buttons and the shaded areas on either side of the scroll thumb is "Press".

  • get_accDescription
    The Description property depends on the part of the scroll bar that is queried.

    The parts of a vertical scroll bar have the following descriptions.

    Scroll bar part Description
    Scroll bar itself "Used to change the vertical viewing area"
    Top arrow button "Moves the vertical position up one line"
    Bottom arrow button "Moves the vertical position down one line"
    Scroll thumb "Indicates the current vertical position, and can be dragged to change it directly"
    Page up region "Moves the vertical position up a couple of lines"
    Page down region "Moves the vertical position down a couple of lines"

    The parts of a horizontal scroll bar have the following descriptions.

    Scroll bar part Description
    Scroll bar itself "Used to change the horizontal viewing area"
    Left arrow button "Moves the horizontal position left one column"
    Right arrow button "Moves the horizontal position right one column"
    Scroll thumb "Indicates the current horizontal position, and can be dragged to change it directly"
    Page left region "Moves the horizontal position left a couple of columns"
    Page right region "Moves the horizontal position right a couple of columns"
  • get_accHelp
    get_accHelpTopic
    get_accName
    The Name property depends on the part of the scroll bar that is queried.

    The parts of a vertical scroll bar have the following names.

    Scroll bar part Name
    Scroll bar window "Vertical"
    Top arrow button "Line up"
    Bottom arrow button "Line down"
    Scroll thumb "Position"
    Page up region "Page up"
    Page down region "Page down"

    The parts of a horizontal scroll bar have the following names.

    Scroll bar part Name
    Scroll bar window "Horizontal"
    Left arrow button "Column left"
    Right arrow button "Column right"
    Scroll thumb "Position"
    Page right region "Page right"
    Page left region "Page left"
  • get_accParent
    The Parent property of the arrow buttons, scroll thumb, and the shaded area on either side of the thumb is the scroll bar window. The Parent property of the scroll bar window is a window (ROLE_SYSTEM_WINDOW) that surrounds the control and has the same Name property and window class name.

  • get_accRole
    The Role property depends on the part of the scroll bar that is queried. The parts of a scroll bar have the following roles.

    Scroll bar part Role
    Scroll bar itself ROLE_SYSTEM_SCROLLBAR
    Top, down, left, and right arrow buttons ROLE_SYSTEM_PUSHBUTTON
    Scroll thumb ROLE_SYSTEM_INDICATOR
    Page up, page down, page left, and page right regions ROLE_SYSTEM_PUSHBUTTON
  • get_accState
    The State property of each scroll bar component includes a combination of the following values:

    Value Meaning
    STATE_SYSTEM_INVISIBLE For the scroll bar itself, this indicates the specified vertical or horizontal scroll bar does not exist. For the page up or page down regions, this indicates the thumb is positioned such that the region does not exist.
    STATE_SYSTEM_OFFSCREEN For the scroll bar itself, this indicates the window is sized such that the specified vertical or horizontal scroll bar is not currently displayed.
    STATE_SYSTEM_PRESSED The arrow button or page region is pressed.
    STATE_SYSTEM_UNAVAILABLE The component is disabled.
  • get_accValue
    The Value property for the scroll bar window indicates the scroll bar position and is a string that contains an integer from "0" through "100".

Events Generated

EVENT_SYSTEM_SCROLLINGSTART

EVENT_SYSTEM_SCROLLINGEND

EVENT_OBJECT_STATECHANGE

EVENT_OBJECT_VALUECHANGE

See Also

IAccessible Interface