PTypeToggle 

                        (VTS Library)

Description:              Parameter Setting Type Toggled Field. This module draws a beveled droplist or editfield with title that sets a tag or numeric value.

Returns:                    Nothing

Usage:                       Steady State

Format:                      \DialogLibrary\PTypeToggle(ParmNum, TagType [, Title, FocusID, VertAlign, AlignTitle, LowLimit, HighLimit, Trigger, EnableExpressions])

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 portion of the graphic. 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 tool.

                                    FocusID    { numeric }  { optional }  { default:  see note}

                                      An optional parameter that is any numeric expression for the focus number of the droplist, the create new tag button and the checkbox selecting the type of field. The droplist will have a focus ID equal to FocusID, the button will have one of FocusID + 1, and the checkbox will have one of FocusID + 2. 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 and checkbox will not be able to be selected.

                             If this parameter is omitted or invalid, the next available focus ID will be assigned.

Note: Any control following a pTypeToggle on a page must have a FocusID set 3 greater than that of the pTypeToggle in order to avoid conflicts.

                                    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.

                                    LowLimit    { numeric }  { optional }  { no default: }

                                      An optional parameter that is any numeric expression giving the minimum value to be accepted by the editfield portion of the tool (it does not affect the tag's value if a tag is accepted). If this parameter is valid and a value less than LowLimit is entered in the field, the variable set by the field will revert to the previous value.

                                    HighLimit    { numeric }  { optional }  { no default: }

                                      An optional parameter that is any numeric expression giving the maximum value to be accepted by the editfield portion of the tool (it does not affect the tag's value if a tag is accepted). If this parameter is valid and a value greater than HighLimit is entered in the field, the variable set by the field will revert to the previous value.

                                    Trigger    { numeric }  { optional }  { no default: }

                                      An optional parameter that is set when the variable is changed.

                                    EnableExpressions    { numeric }  { optional }  { no default: }

                                      An optional parameter that indicates the initial state of DoEnableExpressions.

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 numeric value or the name of the selected tag.

                             The height of the (unopened) droplist, the create new tag button and the checkbox beneath them are constant, with the horizontal boundaries of the calling transform defining the combined width of the droplist and button, 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(10, 160, 270, 60,

             1, 1, 1, 1, 1, 

             0, 0, 1, 0, 

             0, 0, 0, 

             \DialogLibrary\PTypeToggle(1 { Parm num }, 

             "DigitalOutput" { Tag type }, 

             "Choose tag" { Title }, 

             9 { Focus ID }, 

             0 { Top align list }, 

             1 { Align title }, 

             10, 20 { Limits for the value })); 

See Also:

PAreaSelect | PCheckbox | PColorSelect | PContributor | PDroplist | PEditfield | PPageSelect | PRadioButtons | PSecBit | PSelectObject | PSpinbox