The HorizontalScrollbar is a combination window element that automates a scroll bar functionality. While scroll bars can be used independently, they are most often used as a component of other scrolling windows such as the HorizontalScrollWindow.
HorizontalScrollbar | The HorizontalScrollbar is a combination window element that automates a scroll bar functionality. |
XML Definition | This is the HorizontalScrollbar xml definition. |
Implementation Details | The HorizontalScrollbar is a combination window element that automates a scroll bar functionality. |
XML Definition | This is the HorizontalScrollbar xml definition. |
XML Tag | |
Required Attributes | Required for the window element to create itself properly. |
up | Name of the Button definition to use for the up button. |
down | Name of the Button definition to use for the down button. |
thumb | Name of the HorizontalResizeImage definition to use for the scaling scrollbar thumb. |
gutter | Name of the HorizontalResizeImage definition to use for the background for the scroll area. |
Optional Elements | |
UpOffset | The offset for the UpButton from the top of the scrollbar window. |
DownOffset | The offset for the DownButton from the bottom left of the scrollbar window. |
ThumbOffset | The offset for the Thumb from the topleft of the scrollbar window. |
ActiveZoneOffset | The ActiveZone is the area outside of the scrollbar’s dimensions that you can still click and drag the scrollbar. |
Window Callbacks | These are the HorizontalScrollBar specific callback events. |
Callbacks | |
OnScrollPosChanged | Called when the scroll position has changed. |
Functions | |
Functions | |
HorizontalScrollbarSetScrollPosition() | Sets the current scroll position |
HorizontalScrollbarGetScrollPosition() | Returns the current scroll position |
HorizontalScrollbarSetMaxScrollPosition() | Sets the maximum scroll position |
HorizontalScrollbarGetMaxScrollPosition() | Returns the maximum scroll position. |
HorizontalScrollbarSetPageSize() | Sets the page size. |
HorizontalScrollbarGetPageSize() | Returns the page size. |
HorizontalScrollbarSetLineSize() | Sets the line size. |
HorizontalScrollbarGetLineSize() | Returns the line size. |
The HorizontalScrollbar is a combination window element that automates a scroll bar functionality. While scroll bars can be used independently, they are most often used as a component of other scrolling windows such as the HorizontalScrollWindow.
(see ..\docs\images\HorizontalScrollbar_Example1.jpg)
When a scrollbar is sized, the background image resizes to fit it’s dimensions. When used as part of annother window element, the scrollbar’s thumb will automatically size and position itself to reflect it’s parent window’s data.
lineSize | The height of a single line. (Use HorizontalScrollbarSetLineSize() and HorizontalScrollbarGetLineSize()) |
pageSize | The height for a full page. (Use HorizontalScrollbarSetPageSize() and <HorizontalScrollbarGetPageLineSize()>) |
maxScroll | The maximum value of your scroll range. (Use HorizontalScrollbarSetMaxScrollPosition() and HorizontalScrollbarGetMaxScrollPosition()) |
This is the HorizontalScrollbar xml definition.
XML Tag | |
Required Attributes | Required for the window element to create itself properly. |
up | Name of the Button definition to use for the up button. |
down | Name of the Button definition to use for the down button. |
thumb | Name of the HorizontalResizeImage definition to use for the scaling scrollbar thumb. |
gutter | Name of the HorizontalResizeImage definition to use for the background for the scroll area. |
Optional Elements | |
UpOffset | The offset for the UpButton from the top of the scrollbar window. |
DownOffset | The offset for the DownButton from the bottom left of the scrollbar window. |
ThumbOffset | The offset for the Thumb from the topleft of the scrollbar window. |
ActiveZoneOffset | The ActiveZone is the area outside of the scrollbar’s dimensions that you can still click and drag the scrollbar. |
Name of the HorizontalResizeImage definition to use for the scaling scrollbar thumb.
A string value, which is the name of a valid HorizontalResizeImage.
Name of the HorizontalResizeImage definition to use for the background for the scroll area.
A string value, which is the name of a valid HorizontalResizeImage.
The offset for the UpButton from the top of the scrollbar window.
<UpOffset x="2" y="0" />
x | The x pixel offset from the top left corner of the window |
y | The y pixel offset from the top left corner of the window |
x | 0 |
y | 0 |
The offset for the DownButton from the bottom left of the scrollbar window.
<DownOffset x="2" y="0" />
x | The x pixel offset from the bottom left corner of the window |
y | The y pixel offset from the bottom left corner of the window |
x | 0 |
y | 0 |
The offset for the Thumb from the topleft of the scrollbar window.
<UpOffset x="2" y="0" />
x | The x pixel offset from the top left corner of the window |
y | The y pixel offset from the top left corner of the window |
x | 0 |
y | 0 |
The ActiveZone is the area outside of the scrollbar’s dimensions that you can still click and drag the scrollbar. Windows seems to have an active zone of about 100 pixels on either side of a scrollbar.
<ActiveZoneOffset x="100" y="0" />
x | The x pixel distance on either side of the scrollbar. |
y | The y pixel distance on either side of the scrollbar. |
x | 0 |
y | 0 |
These are the HorizontalScrollBar specific callback events.
Callbacks | |
OnScrollPosChanged | Called when the scroll position has changed. |
Called when the scroll position has changed.
SomeHorizontalScrollBar.OnScrollPosChanged( scrollPos )
scrollPos | (number) The current scroll position ( 1 through the the scroll size / page size ). |
Functions | |
HorizontalScrollbarSetScrollPosition() | Sets the current scroll position |
HorizontalScrollbarGetScrollPosition() | Returns the current scroll position |
HorizontalScrollbarSetMaxScrollPosition() | Sets the maximum scroll position |
HorizontalScrollbarGetMaxScrollPosition() | Returns the maximum scroll position. |
HorizontalScrollbarSetPageSize() | Sets the page size. |
HorizontalScrollbarGetPageSize() | Returns the page size. |
HorizontalScrollbarSetLineSize() | Sets the line size. |
HorizontalScrollbarGetLineSize() | Returns the line size. |
Sets the current scroll position
verticalScrollbarName | (string) The name of the HorizontalScrollbar. |
scrollPos | (number) The current scroll position. |
nil | No return value |
HorizontalScrollbarSetScrollPosition("SomeScrollBar", 0 )
Returns the current scroll position
verticalScrollbarName | (string) The name of the HorizontalScrollbar. |
scrollPos | (number) The current scroll position. |
local scrollPos = HorizontalScrollbarGetScrollPosition( "SomeScrollBar" )
Sets the maximum scroll position
verticalScrollbarName | (string) The name of the HorizontalScrollbar. |
maxScrollPos | (number) The maximum scroll position. |
nil | No return value |
HorizontalScrollbarSetMaxScrollPosition("SomeScrollBar", 100 )
Returns the maximum scroll position.
verticalScrollbarName | (string) The name of the HorizontalScrollbar. |
maxScrollPos | (number) The maximum scroll position. |
local maxScrollPos = HorizontalScrollbarGetMaxScrollPosition("SomeScrollBar" )
Sets the page size.
verticalScrollbarName | (string) The name of the HorizontalScrollbar. |
pageSize | (number) The page size. |
nil | No return value |
HorizontalScrollbarSetPageSize("SomeScrollBar", 10 )
Returns the page size.
verticalScrollbarName | (string) The name of the HorizontalScrollbar. |
pageSize | (number) The current page size. |
local pageSize = HorizontalScrollbarGetPageSize("SomeScrollBar" )
Sets the line size.
verticalScrollbarName | (string) The name of the HorizontalScrollbar. |
lineSize | (number) The line size. |
nil | No return value |
HorizontalScrollbarSetLineSize("SomeScrollBar", 10 )