Layout Target References: Difference between revisions
From HLKitWiki
Jump to navigationJump to search
New page: {{context|Kit Reference|Target References}} The "scene" script context applies equally to panels, forms, and sheets. However, there are some important behavioral differences between those... |
No edit summary |
||
Line 1: | Line 1: | ||
{{context|Kit Reference|Target References}} | {{context|Kit Reference|Target References}} | ||
The " | 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. | ||
:{| class="infotable" | :{| class="infotable" | ||
|class="leftnormal"|width | |class="leftnormal"|width | ||
|(Left, Right, Number) Accesses the width of the | |(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.<br> | ||
Example: result = this.width<br> | Example: result = this.width<br> | ||
Example: this.width = 420 | Example: this.width = 420 | ||
|- | |- | ||
|height | |height | ||
|(Left, Right, Number) Accesses the height of the scene. | |(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.<br> | ||
Example: result = this.height<br> | Example: result = this.height<br> | ||
Example: this.height = 420 | Example: this.height = 420 | ||
|- | |- | ||
| | |left | ||
|(Right, Number) | |(Left, Right, Number) Accesses the position of the left edge of the layout within the containing visual element.<br> | ||
Example: result = this. | Example: result = this.left<br> | ||
Example: this.left = 42 | |||
|- | |- | ||
| | |top | ||
|(Right, Number) | |(Left, Right, Number) Accesses the position of the top edge of the layout within the containing visual element.<br> | ||
Example: result = this. | Example: result = this.top<br> | ||
Example: this.top = 42 | |||
|- | |- | ||
| | |right | ||
|(Right, Number) Returns the | |(Right, Number) Returns the position of the right edge of the layout within the containing visual element.<br> | ||
Example: result = this. | Example: result = this.right | ||
|- | |- | ||
| | |bottom | ||
|( | |(Right, Number) Returns the position of the bottom edge of the layout within the containing visual element.<br> | ||
Example: result = this. | Example: result = this.bottom | ||
|- | |- | ||
| | |visible | ||
|(Left, Right, Number) | |(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.<br> | ||
Example: result = this. | Example: result = this.visible<br> | ||
Example: this. | Example: this.visible = 1 | ||
|- | |- | ||
| | |scrollbar | ||
|( | |(Right, Number) Returns the width of a scroller, in pixels.<br> | ||
Example: result = this.scrollbar | |||
Example: result = this. | |||
|- | |- | ||
|autotop | |autotop |
Revision as of 07:18, 7 December 2008
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) autobottom (Left, Right, Number) autoleft (Left, Right, Number) autoright (Left, Right, Number) autowidth (Left, Right, Number) autoheight (Left, Right, Number) autogap (Left, Right, Number) autoplace[gap] (Right, Number)