Scrollbox¶
-
structure
ScrollBox¶ ScrollBoxobjects are created by usingBOX:ADDSCROLLBOX.A scollbox is a box who’s contents can be bigger than it is, accessable via scrollbars.
To constrain the actual size of the box, you can use the
:stylesuffix of the box. For example, this code:set sb to mygui:addscrollbox(). set sb:style:width to 200. set sb:style:height to 200.
would make a scrollbox whose visible part is limited to 200 pixels by 200 pixels.
By default, the GUI layout manager would attempt to make the scrollbox as big as it can, within the constraints of the containing window.
Suffix Type Description Every suffix of BOX. :attr:HALWAYSBooleanAlways show the horizontal scrollbar. VALWAYSBooleanAlways show the vertical scrollbar. POSITIONVectorThe position of the scrolled content (Z is ignored). -
ScrollBox:
HALWAYS¶ Type: BooleanAccess: Get/Set Set to true if you want the horizontal scrollbar to always appear for the box regardless of whether the contents are large enough to require it.
-
ScrollBox:
VALWAYS¶ Type: BooleanAccess: Get/Set Set to true if you want the vertical scrollbar to always appear for the box regardless of whether the contents are large enough to require it.
-
ScrollBox:
POSITION¶ Type: VectorAccess: Get/Set This value tells you where within the window’s content the currently visible portion is. The Vector’s X component tells you the X coordinate of the upper-left corner of the visible portion within the content. The Vector’s Y component tells you the Y coordinate of the upper-left corner of the visible portion within the content. The Vector’s Z component is irrelevant and ignored. (This is really an X/Y pair stored inside a 3D vector).
You can set this value to force the window to scroll to a new position.
-
ScrollBox: