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).
Scrollbar widgets have the following attributes/properties:
Property | Description | Required | In template | Default | Script |
---|---|---|---|---|---|
name | The name of the widget | No | N/A | _scrollbarnn | Read-only |
x | Horizontal screen position | Yes | No | N/A | Yes |
y | Vertical screen position | Yes | No | N/A | Yes |
width | Width of the widget | Yes | Yes | None | Yes |
height | Height of the widget | Yes | Yes | None | Yes |
template | Template to base the widget on | No | N/A | N/A | No |
visible | Whether or not the widget is shown | No | N/A | True | Yes |
background | The image file to display as the scrollbar background | No | Yes | None | Yes |
backgroundstyle | How to draw the image (tiled or normal) | No | Yes | normal | Yes |
knob | The image file to display as the scrollbar knob | No | Yes | None | Yes |
knobfocus | The 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. | No | Yes | None | Yes |
reversed | Whether or not to reverse the display direction (normal meaning left or top being the minimum value). | No | Yes | false | Yes |
maximum | The maximum value of the scrollbar | No | Yes | 100 | Yes |
minimum | The minimum value of the scrollbar | No | Yes | 0 | Yes |
pagestep | The amount to step the value by when paging up/down | No | Yes | 10 | Yes |
value | The position of the scrollbar | Not in XML | N/A | 0 | Yes |
The following methods are supported by scrollbar widgets:
Method | Description |
---|---|
setfocus() | Give focus to the scrollbar. |