Instances of this class are selectable user interface
objects that represent a range of positive, numeric values.
At any given moment, a given scroll bar will have a
single 'selection' that is considered to be its
value, which is constrained to be within the range of
values the scroll bar represents (that is, between its
minimum and maximum values).
Typically, scroll bars will be made up of five areas:
an arrow button for decrementing the value
a page decrement area for decrementing the value by a larger amount
a thumb for modifying the value by mouse dragging
a page increment area for incrementing the value by a larger amount
an arrow button for incrementing the value
Based on their style, scroll bars are either HORIZONTAL
(which have a left facing button for decrementing the value and a
right facing button for incrementing it) or VERTICAL
(which have an upward facing button for decrementing the value
and a downward facing buttons for incrementing it).
On some platforms, the size of the scroll bar's thumb can be
varied relative to the magnitude of the range of values it
represents (that is, relative to the difference between its
maximum and minimum values). Typically, this is used to
indicate some proportional value such as the ratio of the
visible area of a document to the total amount of space that
it would take to display it. SWT supports setting the thumb
size even if the underlying platform does not, but in this
case the appearance of the scroll bar will not change.
Scroll bars are created by specifying either H_SCROLL,
V_SCROLL or both when creating a Scrollable.
They are accessed from the Scrollable using
getHorizontalBar and getVerticalBar.
Note: Scroll bars are not Controls. On some platforms, scroll bars
that appear as part of some standard controls such as a text or list
have no operating system resources and are not children of the control.
For this reason, scroll bars are treated specially. To create a control
that looks like a scroll bar but has operating system resources, use
Slider.
Styles:
HORIZONTAL, VERTICAL
Events:
Selection
Note: Only one of the styles HORIZONTAL and VERTICAL may be specified.
IMPORTANT: This class is not intended to be subclassed.
At any given moment, a given scroll bar will have a single 'selection' that is considered to be its value, which is constrained to be within the range of values the scroll bar represents (that is, between its minimum and maximum values).
Typically, scroll bars will be made up of five areas:
- an arrow button for decrementing the value
- a page decrement area for decrementing the value by a larger amount
- a thumb for modifying the value by mouse dragging
- a page increment area for incrementing the value by a larger amount
- an arrow button for incrementing the value
Based on their style, scroll bars are eitherHORIZONTAL(which have a left facing button for decrementing the value and a right facing button for incrementing it) orVERTICAL(which have an upward facing button for decrementing the value and a downward facing buttons for incrementing it).On some platforms, the size of the scroll bar's thumb can be varied relative to the magnitude of the range of values it represents (that is, relative to the difference between its maximum and minimum values). Typically, this is used to indicate some proportional value such as the ratio of the visible area of a document to the total amount of space that it would take to display it. SWT supports setting the thumb size even if the underlying platform does not, but in this case the appearance of the scroll bar will not change.
Scroll bars are created by specifying either
H_SCROLL,V_SCROLLor both when creating aScrollable. They are accessed from theScrollableusinggetHorizontalBarandgetVerticalBar.Note: Scroll bars are not Controls. On some platforms, scroll bars that appear as part of some standard controls such as a text or list have no operating system resources and are not children of the control. For this reason, scroll bars are treated specially. To create a control that looks like a scroll bar but has operating system resources, use
Slider.Note: Only one of the styles HORIZONTAL and VERTICAL may be specified.
IMPORTANT: This class is not intended to be subclassed.