Scene Target References: Difference between revisions

From HLKitWiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 45: Line 45:
Example: result = this.maxheight<br>
Example: result = this.maxheight<br>
Example: this.maxheight = 420
Example: this.maxheight = 420
|-
|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)
|-
|-
|}
|}

Revision as of 05:17, 7 December 2008

Context: HL Kit &#133; Kit Reference &#133; Target References 

The "scene" script context applies equally to panels, forms, and sheets. However, there are some important behavioral differences between those three visual elements that impact how certain target references operate for each, and those different are detailed below. The complete list of target references for scenes is presented in the table below.

width (Left, Right, Number) Accesses the width of the scene. The width of panels and sheets is properly setup by HL and any changes are completely ignored, as HL wholly controls the rendering region for panels and sheets. For forms, the width is initialized to something safe by HL, but the author is assumed to set the width appropriately for the contents that need to be displayed.

Example: result = this.width
Example: this.width = 420

height (Left, Right, Number) Accesses the height of the scene. The same rules apply as for the "width" target reference above.

Example: result = this.height
Example: this.height = 420

scrollbar (Right, Number) Returns the width of a scroller, in pixels.

Example: result = this.scrollbar

defwidth (Right, Number) Returns the default width for a form that is specified within the form's definition. Only applicable to forms.

Example: result = this.defwidth

defheight (Right, Number) Returns the default height for a form that is specified within the form's definition. Only applicable to forms.

Example: result = this.defheight

minwidth (Left, Right, Number) Accesses the minimum width governing the form. A value of zero indicates the minimum width should be the default width. If both minwidth and maxwidth are zero, the form cannot be resized by the user. If data files specify both minwidth and maxwidth as zero, the form width cannot be modified via scripts. If the min/max values are modified such that the current dimensions of the form become invalid, the form dimensions are automatically adjusted to comply with the new limits. Only applicable to forms.

Example: result = this.minwidth
Example: this.minwidth = 420

minheight (Left, Right, Number) Accesses the minimum height governing the form. The same rules apply as for the "minwidth" target reference above.

Example: result = this.minheight
Example: this.minheight = 420

maxwidth (Left, Right, Number) Accesses the maximum width governing the form. The same rules apply as for the "minwidth" target reference above.

Example: result = this.maxwidth
Example: this.maxwidth = 420

maxheight (Left, Right, Number) Accesses the maximum height governing the form. The same rules apply as for the "minwidth" target reference above.

Example: result = this.maxheight
Example: this.maxheight = 420