(VTS Library)
Description: This module draws a droplist of area options with (optional) title and/or bevel.
Returns: Nothing
Usage: Steady State
Format: \DialogLibrary\PAreaSelect( [CanEdit, FocusID, Init, DrawBevel, VertAlign, AlignTitle, ParmNum, ExtTrigger, OKPressed ])
Parameters: CanEdit { Boolean } { optional } { default: TRUE }
An optional parameter that is any logical expression; if true (non-0) the text displayed in the area droplist can be edited in the same manner as an editfield, if false (0) it cannot be edited directly. The default value is true.
FocusID { numeric } { optional } { default: 2 }
An optional parameter that is any numeric expression for the focus number of this graphic. If this value is 0, the area droplist will display its current setting, but will not be able to be opened (i.e. its value cannot be changed) and will appear grayed out. The default value is 2.
Init { numeric } { optional } { no default }
An optional parameter indicating the initial value.
DrawBevel { Boolean } { optional } { default: TRUE }
An optional parameter that is any logical expression; if true (non-0) a bevel is drawn around the area droplist, if false (0) no bevel is drawn. The default value is true.
VertAlign { numeric } { optional } { default: 0 }
An optional parameter that is any numeric expression that sets the vertical alignment of the unopened area droplist according to one of the following:
|
VertAlign |
Vertical Alignment |
|
0 |
Top |
|
1 |
Center |
|
2 |
Bottom |
Whether or not the title is included when the vertical alignment is calculated is determined by the value of AlignTitle. The default value is 0.
AlignTitle { Boolean } { optional } { default: TRUE }
An optional parameter that is any logical expression; if true (non-0) the title is included in the calculation for vertical alignment, if false(0) it is added to the area droplist after it (and its bevel if one exists) has been vertically aligned. The default is true.
ParmNum { numeric } { optional } { no default }
An optional parameter number (starting from 0), that will be edited instead of the default Area parameter. ParmNum allows you to specify the parameter to which you wish to add an area.
ExtTrigger { Boolean } { optional } { no default }
An external trigger, to be set when the area changes. Output value only.
OKPressed { Boolean } { required } { no default }
Linked to the OK button on the Config folder.
Comments: This module is a member of the VTS Dialog Library and must therefore be called from within a GUITransform and prefaced by \DialogLibrary\.
This parameter tool expects the first parameter of its calling module to contain an array of tag parameters. It will then set the second element (element 1) to the text string that designates the selected area.
The height of the (unopened) area droplist is constant, with the horizontal boundaries of its calling transform defining its width, and the vertical boundaries of its calling transform defining its opened height, which will include the added height of a bevel, but may or may not include the title, depending on the alignment used. Note that if the entire list can be displayed in a smaller area than indicated by the vertical boundaries of the calling transform, the dropped list height will be decreased accordingly. The dropped height of the list will always have a minimum height of 1 line (below the field).
For any optional parameter that is to be set, all optional parameters preceding the desired one must be present, although they may be invalid.
Examples:
GUITransform(30, 180, 210, 80,
1, 1, 1, 1, 1,
0, 0, 1, 0,
0, 0, 0,
\DialogLibrary\PAreaSelect(0 { Not editable },
1 { Focus ID },
0 { No bevel },
Invalid
{ Use default },
0 { Align bevel }));
GUITransform(10, 120, 110, 20,
1, 1, 1, 1, 1,
0, 0, 1, 0,
0, 0, 0,
\DialogLibrary\PAreaSelect());
GUITransform(10, 120, 110, 20,
1, 1, 1, 1, 1,
0, 0, 1, 0,
0, 0, 0,
\DialogLibrary\PAreaSelect(1 { Not editable },
2 { Focus ID },
1 { Draw bevel },
0 { Top align },
1 { Align title }));
Notice that the last two examples produce the exact same results, because the last duplicates the default settings.
See Also:
PCheckbox | PColorSelect | PContributor | PDroplist | PEditfield | PPageSelect | PRadioButtons | PSecBit | PSelectObject | PSpinbox | PTypeToggle