The ScrollWindow is a container window that provides a vertical scrolling panel for all of it’s child windows.
ScrollWindow | The ScrollWindow is a container window that provides a vertical scrolling panel for all of it’s child windows. |
Implementation Details | To use a scroll window, you add children as normal to it’s childscrollwindow. |
XML Definition | This is the ScrollWindow XML definition. |
XML Tag | |
Required Attributes | Required for the window element to create itself properly. |
childscrollwindow | Name of the child Window that contains all items you wish to scroll through. |
scrollbar | Name of the child <VerticalScrollBar> that is anchored at the appropriate location on the window. |
lineheight | The line height to be used with the scrollbar. |
autoHideScrollBar | Auto-hides the scroll bar when the window the contents scroll child is less than one page. |
ScrollWindowSetOffset() | Sets the current scroll position offset. |
ScrollWindowGetOffset() | Returns the current scroll position offset. |
ScrollWindowUpdateScrollRect() | Updates the childscrollwindow and scrollbar to reflect it’s current contents. |
To use a scroll window, you add children as normal to it’s childscrollwindow. This child window will resize as necissary to fit the lenght of your child windows when you call ScrollWindowUpdateScrollRect(). If the contents of the window extend beyond the size of the scroll window, the scrollbar will be shown and automatically update to reflect the lenght of your child windows.
The ScrollWindow is very useful to create a scrolling pannel of assorted data or large blocks of text. If you want to display a list of similar information, considering using a ListBox element instead.
This is the ScrollWindow XML definition.
XML Tag | |
Required Attributes | Required for the window element to create itself properly. |
childscrollwindow | Name of the child Window that contains all items you wish to scroll through. |
scrollbar | Name of the child <VerticalScrollBar> that is anchored at the appropriate location on the window. |
lineheight | The line height to be used with the scrollbar. |
autoHideScrollBar | Auto-hides the scroll bar when the window the contents scroll child is less than one page. |
ScrollWindowSetOffset() | Sets the current scroll position offset. |
ScrollWindowGetOffset() | Returns the current scroll position offset. |
ScrollWindowUpdateScrollRect() | Updates the childscrollwindow and scrollbar to reflect it’s current contents. |
Name of the child <VerticalScrollBar> that is anchored at the appropriate location on the window.
A string value, which is the name of a valid child <VerticalScrollBar>.
Auto-hides the scroll bar when the window the contents scroll child is less than one page.
A boolean value.
Sets the current scroll position offset.
scrollWindowName | (string) The name of the ScrollWindow |
scrollPos | (number) The current scroll position offset. |
nil | no return value |
ScrollWindowSetOffset( "InteractionWindowMain", 0 )
Returns the current scroll position offset.
scrollWindowName | (string) The name of the ScrollWindow |
scrollPos | (number) The current scroll position offset. |
local scrollPos = ScrollWindowGetOffset( "InteractionWindowMain" )
Updates the childscrollwindow and scrollbar to reflect it’s current contents.
scrollWindowName | (string) The name of the ScrollWindow |
nil | no return value |
ScrollWindowUpdateScrollRect( "InteractionWindowMain" )