Slider Control

A slider control, also called a trackbar control, lets a user select from a range of values by moving a slider. The volume controls in the Windows operating system are slider controls.

The window class name for a slider control is TRACKBAR_CLASS, which is defined as "msctls_trackbar" in Commctrl.h.

The contents of the IAccessible properties depend on whether the slider is vertical or horizontal and on which of the following parts of the slider control is queried by the client:

  • Slider window
  • Slider thumb
  • Shaded area above (or to
  • Shaded area below (or to the right of) the slider thumb

Supported Properties and Methods

  • accHitTest
    accLocation
    accNavigate
    accSelect
    get_accChild
    get_accChildCount
    get_accDescription
    get_accHelp
    get_accHelpTopic
    get_accKeyboardShortcut
    The KeyboardShortcut property is the slider window's access key, which is an underlined character in the text of the label for the slider. The returned string contains the access key character appended to the string "Alt+".

  • get_accName
    The Name property depends on the part of the slider that is queried.

    The parts of a vertical slider have the following names:

    Slider part Name
    Slider window Static text control used as a label
    Slider thumb "Position"
    Shaded area above slider thumb "Page up"
    Shaded area below slider thumb "Page down"

    The parts of a horizontal slider have the following names:

    Slider part Name
    Slider window Static text control used as a label
    Slider thumb "Position"
    Shaded area to the left of slider thumb "Page left"
    Shaded area to the right of slider thumb "Page right"
  • get_accParent
    The Parent property of the arrow buttons, scroll thumb, and the shaded area on either side of the thumb is the slider window. The Parent property of the slider 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 slider that is queried.

    Slider part Role
    Slider window ROLE_SYSTEM_SLIDER
    Slider thumb ROLE_SYSTEM_INDICATOR
    Shaded areas on either side of the slider thumb ROLE_SYSTEM_PUSHBUTTON
  • get_accState
    Values for the State property depend on the part of the slider that is queried.

    Slider Part Possible state values
    Slider window STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_UNAVAILABLE | STATE_SYSTEM_FOCUSED | STATE_SYSTEM_FOCUSABLE | STATE_SYSTEM_NORMAL
    Slider thumb Zero (0), which means the object is visible, or STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_UNAVAILABLE | STATE_SYSTEM_NORMAL
    Shaded areas on either side of the slider thumb Zero (0), which means the object is visible, or STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_UNAVAILABLE | STATE_SYSTEM_NORMAL
  • get_accValue
    The Value property for the slider window indicates the position of the thumb and is a string that contains an integer from "0" through "100".

Events Generated

EVENT_OBJECT_VALUECHANGE

See Also

IAccessible Interface Scroll Bar