HorizontalScrollWindow

The HorizontalScrollWindow is a container window that provides a horizontal scrolling panel for all of it’s child windows.

Summary
HorizontalScrollWindowThe HorizontalScrollWindow is a container window that provides a horizontal scrolling panel for all of it’s child windows.
Implementation DetailsTo use a HorizontalScrollWindow, you add children as normal to it’s childscrollwindow.
XML DefinitionThis is the HorizontalScrollWindow XML definition.
XML Tag
Required AttributesRequired for the window element to create itself properly.
childscrollwindowName of the child Window that contains all items you wish to scroll through.
scrollbarName of the child <HorizontalScrollBar> that is anchored at the appropriate location on the window.
lineheightThe line height to be used with the scrollbar.
autoHideScrollBarAuto-hides the scroll bar when the window the contents scroll child is less than one page.
HorizontalScrollWindowSetOffset()Sets the current scroll position offset.
HorizontalScrollWindowGetOffset()Returns the current scroll position offset.
HorizontalScrollWindowUpdateScrollRect()Updates the childscrollwindow and scrollbar to reflect it’s current contents.

Implementation Details

To use a HorizontalScrollWindow, 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.

(see ..\docs\images\HorizontalScrollWindow_Example1.jpg)

XML Definition

This is the HorizontalScrollWindow XML definition.

Summary
XML Tag
Required AttributesRequired for the window element to create itself properly.
childscrollwindowName of the child Window that contains all items you wish to scroll through.
scrollbarName of the child <HorizontalScrollBar> that is anchored at the appropriate location on the window.
lineheightThe line height to be used with the scrollbar.
autoHideScrollBarAuto-hides the scroll bar when the window the contents scroll child is less than one page.
HorizontalScrollWindowSetOffset()Sets the current scroll position offset.
HorizontalScrollWindowGetOffset()Returns the current scroll position offset.
HorizontalScrollWindowUpdateScrollRect()Updates the childscrollwindow and scrollbar to reflect it’s current contents.

XML Tag

<HorizontalScrollWindow>
....
</HorizontalScrollWindow>

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.  The scroll child should anchored at the appropriate spot on the window.  It will be adjusted left and right automatically to facilitate scrolling.

Expects

A string value, which is the name of a valid child Window.

Default Value

  • ””

scrollbar

Name of the child <HorizontalScrollBar> that is anchored at the appropriate location on the window.

Expects

A string value, which is the name of a valid child <HorizontalScrollBar>.

Default Value

  • ””

lineheight

The line height to be used with the scrollbar.

Expects

A number value.

Default Value

  • 0

autoHideScrollBar

Auto-hides the scroll bar when the window the contents scroll child is less than one page.

Expects

A boolean value.

Default Value

  • false

HorizontalScrollWindowSetOffset()

Sets the current scroll position offset.

Parameters

horizScrollWindowName(string) The name of the HorizontalScrollWindow
scrollPos(number) The current scroll position offset.

Returns

nilno return value

Notes

  • none

Example

HorizontalScrollWindowSetOffset( "InteractionWindowMain", 0 )

HorizontalScrollWindowGetOffset()

Returns the current scroll position offset.

Parameters

horizScrollWindowName(string) The name of the HorizontalScrollWindow

Returns

scrollPos(number) The current scroll position offset.

Notes

  • none

Example

local scrollPos = HorizontalScrollWindowGetOffset( "InteractionWindowMain" )

HorizontalScrollWindowUpdateScrollRect()

Updates the childscrollwindow and scrollbar to reflect it’s current contents.

Parameters

horizScrollWindowName(string) The name of the HorizontalScrollWindow

Returns

nilno return value

Notes

  • none

Example

HorizontalScrollWindowUpdateScrollRect( "InteractionWindowMain" )
Name of the child Window that contains all items you wish to scroll through.
Window is the base level window definition.
Name of the child HorizontalScrollBar that is anchored at the appropriate location on the window.
Updates the childscrollwindow and scrollbar to reflect it’s current contents.