class BaseScrollBar
package feathers.controls.supportClasses
extends FeathersControl › MeasureSprite › ValidatingSprite
implements IScrollBar
extended by HScrollBar, VScrollBar
Base class for scroll bar components.
1.0.0
.See also:
Variables
fixedThumbSize:Bool
Determines if the scroll bar's thumb will be resized based on the
scrollable range between the minimum
and maximum
, or if it will
always be rendered at its preferred size, even if the minimum
and
maximum
values change.
In the following example, the thumb size is fixed:
scrollBar.fixedThumbSize = true;
1.0.0
.liveDragging:Bool = true
Determines if the scroll bar dispatches the Event.CHANGE
event every time
that the thumb moves while dragging, or only after the user stops
dragging.
In the following example, live dragging is disabled:
scrollBar.liveDragging = false;
1.0.0
.maximum:Float
The scroll bar's value cannot be larger than the maximum.
In the following example, the maximum is set to 100.0
:
scrollBar.minimum = 0.0;
scrollBar.maximum = 100.0;
scrollBar.step = 1.0;
scrollBar.value = 12.0;
1.0.0
.See also:
minimum:Float
The scroll bar's value cannot be smaller than the minimum.
In the following example, the minimum is set to -100.0
:
scrollBar.minimum = -100.0;
scrollBar.maximum = 100.0;
scrollBar.step = 1.0;
scrollBar.value = 50.0;
1.0.0
.See also:
paddingBottom:Float
The minimum space, in pixels, between the scroll bar's bottom edge and the scroll bar's thumb.
In the following example, the scroll bar's bottom padding is set to 20 pixels:
scrollBar.paddingBottom = 20.0;
1.0.0
.See also:
paddingLeft:Float
The minimum space, in pixels, between the scroll bar's left edge and the scroll bar's thumb.
In the following example, the scroll bar's left padding is set to 20 pixels:
scrollBar.paddingLeft = 20.0;
1.0.0
.See also:
paddingRight:Float
The minimum space, in pixels, between the scroll bar's right edge and the scroll bar's thumb.
In the following example, the scroll bar's right padding is set to 20 pixels:
scrollBar.paddingRight = 20.0;
1.0.0
.See also:
paddingTop:Float
The minimum space, in pixels, between the scroll bar's top edge and the scroll bar's thumb.
In the following example, the scroll bar's top padding is set to 20 pixels:
scrollBar.paddingTop = 20.0;
1.0.0
.See also:
page:Float
The amount the scroll bar value must change to get from one "page" to the next or previous adjacent page.
If page
is 0.0
, the value of step
will be used instead. If step
is also 0.0
, then paging will be disabled.
In the following example, the page is changed to 10.0
:
scrollBar.minimum = 0.0;
scrollBar.maximum = 100.0;
scrollBar.step = 1.0;
scrollBar.page = 10.0;
scrollBar.value = 10.0;
1.0.0
.See also:
secondaryTrackSkin:InteractiveObject
The skin to use for the scroll bar's optional secondary track. If a scroll bar has one track, it will fill the entire length of the scroll bar. If a scroll bar has a track and a secondary track, the primary track will stretch between the minimum edge of the scroll bar and the location of the scroll bar's thumb, while the secondary track will stretch from the location of the scroll bar's thumb to the maximum edge of the scroll bar.
In the following example, a track skin and a secondary track skin are passed to the scroll bar:
var skin = new RectangleSkin();
skin.fill = SolidColor(0xaaaaaa);
scrollBar.trackSkin = skin;
var skin = new RectangleSkin();
skin.fill = SolidColor(0xcccccc);
scrollBar.secondaryTrackSkin = skin;
1.0.0
.See also:
snapInterval:Float
When the scroll bar's value
changes, it may be "snapped" to the
nearest multiple of snapInterval
. If snapInterval
is 0.0
, the
value
is not snapped.
In the following example, the snap inverval is changed to 1.0
:
slider.minimum = 0.0;
slider.maximum = 100.0;
slider.step = 1.0;
slider.snapInterval = 1.0;
slider.value = 10.0;
1.0.0
.See also:
step:Float
When the scroll bar's increment/decrement buttons are triggered, the
value
is modified by adding or subtracting step
.
In the following example, the step is changed to 1.0
:
scrollBar.minimum = 0.0;
scrollBar.maximum = 100.0;
scrollBar.step = 1.0;
scrollBar.value = 10.0;
1.0.0
.See also:
thumbSkin:InteractiveObject
The skin to use for the scroll bar's thumb.
In the following example, a thumb skin is passed to the scroll bar:
var skin = new RectangleSkin();
skin.fill = SolidColor(0xcccccc);
scrollBar.thumbSkin = skin;
1.0.0
.See also:
trackSkin:InteractiveObject
The skin to use for the scroll bar's track.
In the following example, a track skin is passed to the scroll bar:
var skin = new RectangleSkin();
skin.fill = SolidColor(0xcccccc);
scrollBar.trackSkin = skin;
1.0.0
.See also:
value:Float
The value of the scroll bar, which must be between the minimum
and the
maximum
.
When the value
property changes, the scroll bar will dispatch an event
of type Event.CHANGE
.
In the following example, the value is changed to 12.0
:
scrollBar.minimum = 0.0;
scrollBar.maximum = 100.0;
scrollBar.step = 1.0;
scrollBar.value = 12.0;
1.0.0
.See also:
openfl.events.Event.CHANGE