(VTS Library)
Description: Parameter Setting Select Tag Object Tool. This module draws a beveled, titled droplist of existing tags of a certain type and a new tag creation button.
Returns: Nothing
Usage: Steady State
Format: \DialogLibrary\PSelectObject(ParmNum, TagType [, Title, FocusID, VertAlign, AlignTitle])
Parameters: ParmNum { numeric } { required } { no default: }
Any numeric expression giving the parameter number (from 0) in the caller to alter.
TagType { text } { required } { no default: }
Any text expression for the type of tag used to create the droplist. All existing tags of this type will be listed.
Title { text } { optional } { no default: }
An optional parameter that is any text expression to be used as a title for the droplist.
FocusID { numeric } { optional } { default: see note }
An optional parameter that is any numeric expression for the focus number of the droplist and the create new tag button. The droplist will have a focus ID equal to FocusID, and the button will have one of FocusID + 1. If FocusID is 0, the 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; similarly, the button will not be able to be selected.
If this parameter is omitted or invalid, the next available focus ID will be assigned.
VertAlign { numeric } { optional } { default: 0 }
An optional parameter that is any numeric expression that sets the vertical alignment of the unopened 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 AlignTitle is true (non-0), the title will be included in the calculation for vertical alignment. If AlignTitle is false (0), the title will be added to the editfield after both the editfield and its bevel have been vertically aligned. The default is true.
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 element indicated by ParmNum to the chosen item.
The height of the (unopened) droplist and the create new tag button are constant, with the horizontal boundaries of the calling transform defining their combined width, and the vertical boundaries of the calling transform defining the droplist's opened height, which will include the added height of the bevel above the field, 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.
Example:
GUITransform(170, 160, 370, 60,
1, 1, 1, 1, 1,
0, 0, 1, 0,
0, 0, 0,
\DialogLibrary\PSelectObject(2 { Parm num },
"AnalogInput" { Tag type },
"Analog Inputs" { Title },
2 { Focus ID },
1 { Center list },
0 { Align top of bevel }));
See Also:
PAreaSelect | PCheckbox | PColorSelect | PContributor | PDroplist | PEditfield | PPageSelect | PRadioButtons | PSecBit | PSpinbox | PTypeToggle