Export (0) Print
Expand All

Scroll Bar (MSAA UI Element Reference)

Note  This topic describes Scroll Bar objects for purposes of MSAA UI Element Reference. How to create Scroll Bar objects in various UI frameworks is not described here. See the API reference documentation for the UI framework you're using.

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

IAccessible Methods

A scroll bar supports the following IAccessible methods:

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

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

    Button/RegionVaule
    Top arrow buttonSB_LINEUP
    Bottom arrow buttonSB_LINEDOWN
    Page up regionSB_PAGEUP
    Page down regionSB_PAGEDOWN

     

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

    Button/RegionValue
    Left arrow buttonSB_LINELEFT
    Right arrow buttonSB_LINERIGHT
    Page left regionSB_PAGELEFT
    Page right regionSB_PAGERIGHT

     

  • accHitTest
  • accLocation
  • accNavigate

IAccessible Properties

A scroll bar supports the following IAccessible properties:

  • 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.

    PartDescription
    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"Indicates the current vertical position, and can be dragged to change it directly"

     

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

    PartDescription
    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"Indicates the current vertical position, and can be dragged to change it directly"

     

  • 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.

    PartName
    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.

    PartName
    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.
    PartRole
    Scroll bar itselfROLE_SYSTEM_SCROLLBAR
    Top, down, left, and right arrow buttonsROLE_SYSTEM_PUSHBUTTON
    Scroll thumbROLE_SYSTEM_INDICATOR
    Page up, page down, page left, and page right regionsROLE_SYSTEM_PUSHBUTTON

     

  • get_accState—The State property of each scroll bar component includes a combination of the following values.
    StateValue
    STATE_SYSTEM_INVISIBLEFor 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_OFFSCREENFor 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_PRESSEDThe arrow button or page region is pressed.
    STATE_SYSTEM_UNAVAILABLEThe 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".

Related topics

IAccessible Interface

 

 

Community Additions

ADD
Show:
© 2014 Microsoft