Layout Target References
Context: HL Kit … Kit Reference … Target References
The "layout" script context governs the operations that can be applied to layouts within scenes. The complete list of target references for layouts is presented in the table below.
width (Left, Right, Number) Accesses the width of the layout. Unless explicitly specified within the XML, the width of a layout is initialized to the width of the containing scene, minus any assigned margins.
Example: result = this.width
Example: this.width = 420height (Left, Right, Number) Accesses the height of the scene. Unless explicitly specified within the XML, the height of a layout is initialized to the height of the containing scene, minus any assigned margins.
Example: result = this.height
Example: this.height = 420left (Left, Right, Number) Accesses the position of the left edge of the layout within the containing visual element.
Example: result = this.left
Example: this.left = 42top (Left, Right, Number) Accesses the position of the top edge of the layout within the containing visual element.
Example: result = this.top
Example: this.top = 42right (Right, Number) Returns the position of the right edge of the layout within the containing visual element.
Example: result = this.right
bottom (Right, Number) Returns the position of the bottom edge of the layout within the containing visual element.
Example: result = this.bottom
visible (Left, Right, Number) Controls the visibility of the layout within the containing visual element. A non-zero value indicates the layout is visible and a zero value indicates hidden.
Example: result = this.visible
Example: this.visible = 1scrollbar (Right, Number) Returns the width of a scroller, in pixels.
Example: result = this.scrollbar
autotop (Left, Right, Number) Accesses the position of the top edge of the auto-place region within the containing visual element.
Example: result = this.autotop
Example: this.autotop = 42autobottom (Left, Right, Number) Accesses the position of the bottom edge of the auto-place region within the containing visual element.
Example: result = this.autobottom
Example: this.autobottom = 420autoleft (Left, Right, Number) Accesses the position of the left edge of the auto-place region within the containing visual element.
Example: result = this.autoleft
Example: this.autoleft = 42autoright (Left, Right, Number) Accesses the position of the right edge of the auto-place region within the containing visual element.
Example: result = this.autoright
Example: this.autoright = 420autowidth (Left, Right, Number) Accesses the width of the auto-place region within the containing visual element.
Example: result = this.autowidth
Example: this.autowidth = 420autoheight (Left, Right, Number) Accesses the height of the auto-place region within the containing visual element.
Example: result = this.autoheight
Example: this.autoheight = 420autogap (Left, Right, Number) Accesses the default gap size used when automatically placing elements within the containing visual element. The "autogap" defaults to zero.
Example: result = this.autogap
Example: this.autogap = 42autoplace[gap] (Right, Number) Automatically places the layout within the containing visual element, subject to the standard rules for automatic placement. The gap parameter specifies the gap to be used between this layout and the previous placed element. The parameter can be omitted, in which case the established "autogap" is utilized.
Example: this.autoplace[42]
Example: this.autoplace