ScrollBar

Scrollbar widgets allow the user to slide a knob along a vertical or horizontal track in order to select a numeric value. eboxy scrollbars currently do not have buttons, so they are equivalent to "sliders" in some other systems. The combination of the width and height attributes determines if the scrollbar behaves horizontally or vertically (horizontally if the scrollbar is wider than it is high, vertically if it is higher than it is wide).

Properties

Scrollbar widgets have the following attributes/properties:

PropertyDescriptionRequiredIn templateDefaultScript
nameThe name of the widgetNoN/A_scrollbarnnRead-only
xHorizontal screen positionYesNoN/AYes
yVertical screen positionYesNoN/AYes
widthWidth of the widgetYesYesNoneYes
heightHeight of the widgetYesYesNoneYes
templateTemplate to base the widget onNoN/AN/ANo
visibleWhether or not the widget is shownNoN/ATrueYes
backgroundThe image file to display as the scrollbar backgroundNoYesNoneYes
backgroundstyleHow to draw the image (tiled or normal)NoYesnormalYes
knobThe image file to display as the scrollbar knobNoYesNoneYes
knobfocusThe image file to display as the scrollbar knob when the scrollbar has the focus. If specified, must be the same size as the normal knob image.NoYesNoneYes
reversedWhether or not to reverse the display direction (normal meaning left or top being the minimum value).NoYesfalseYes
maximumThe maximum value of the scrollbarNoYes100Yes
minimumThe minimum value of the scrollbarNoYes0Yes
pagestepThe amount to step the value by when paging up/downNoYes10Yes
valueThe position of the scrollbarNot in XMLN/A0Yes

Methods

The following methods are supported by scrollbar widgets:

MethodDescription
setfocus()Give focus to the scrollbar.

Events

The following events are triggered by scrollbar widgets:

EventDescription
OnChangeOccurs when the value of the scrollbar is changed.
OnGotFocusOccurs when the scrollbar receives focus.
OnLostFocusOccurs when the scrollbar loses focus.