UnTypedParameterEdit
(VTScada-Layer function. Must be called with a leading backslash.)
| Description: | Wrapper for ParameterEdit, add a control to a panel without requiring a type. |
| Returns: | Self |
Usage: ![]() |
Steady State only. |
| Function Groups: | Basic Module, Variable |
| Related to: | ParameterEdit| ColorParameterEdit | DurationParameterEdit | NumericParameterEdit | TextParameterEdit | TimestampParameterEdit | TagParameterEdit |
Format: ![]() |
UntypedParameterEdit(Left, Bottom, Right, Top, ParmVal, ParmCodePtr, Title, PtrWaitClose, DialogRoot, PTypeIdx[, TitleWidth, ShowDrawnTagProperty, ID, Translate, ToolTitleWidthOut, Description, NLines, MinLimit, MaxLimit, IsSpinBox, DroplistChoices]) |
| Parameters: |
| Left |
| Required. Any numeric expression for the left edge of the object. |
| Bottom |
| Required. Any numeric expression for the bottom edge of the object. |
| Right |
| Required. Any numeric expression for the right edge of the object. |
| Top |
| Required. Any numeric expression for the top edge of the object. |
| ParmVal |
| The parameter value to be altered. Typically, one element of the array of parameters passed to the panel. |
| ParmCodePtr |
| The code pointer to the parameter. Typically, one element of the array of parameter definition structures that correspond to the ParmVal. |
| Title |
| The title to display. |
| PtrWaitClose |
| Wait to close. The parameter edit module will set the value of this pointer to true when the caller should wait to close. For example, if the parameter edit is displaying a dialog, or completing a calculation. |
| DialogRoot |
| Root dialog calling this control. Typically provided by the panel module. |
| PTypeIdx |
| Index of the Parameter type selection. |
| TitleWidth |
| Optional, number of pixels allotted for the width of the title. |
| ShowDrawnTagProperty |
| Optional Boolean, set to TRUE to show "Drawn Tag Property". Defaults to TRUE. |
| FocusID |
| Optional value from 0 to 32767 for the focus ID of this control. |
| Translate |
| Optional. How text option translation is handled
0 - Use text as it is entered 1 - Use PhraseID Wrapped in GetPhrase() (Default) 2 - Use PhraseID not wrapped in GetPhrase() |
| ToolTitleWidthOut |
| Optional numeric output value. Holds the width of the parameter edit's tool and title. |
| Description |
| Optional text describing this parameter. |
| NLines |
| Height of the edit field of the text option. Default = 2 lines |
| MinLimit |
| Minimum limit of the selection. |
| MaxLimit |
| Maximum limit of the selection. |
| IsSpinBox |
| Optional Boolean. When TRUE the numeric option is displayed as a spin box. |
| DroplistChoices |
| Optional. Dynamic array. Contains the array of labels for a droplist. If it is valid, the UnTypedParamterEdit's value will be displayed as a droplist. |
| Comments: |
Automatically determines what module to use for display and entry of the existing value. Supports text, numeric, tag, parameter, tag property, text expression, and expression options. If DroplistChoices is valid, the numeric option value will be displayed as a droplist, with the first entry setting the value to 0, the second to 1, and so on. |
Example 1:
ParmEditObj = \UntypedParameterEdit(0, 2 * (EditHt + Space), PanelWd, 0,
Parms.StatusMessage { The Parameter value to alter },
ParmDefs.StatusMessage { The code pointer to the parameter },
\GetPhrase("StatusLabel") { The title to display },
&SubWaitClose { Wait to close },
DialogRoot { Root dialog calling this control },
0 { Index of the Parameter type selection },
Invalid { Width alloted for the Title },
True { True to show "Drawn Tag Property" },
1 { Focus ID },
0 { Use text as it is entered },
Invalid { [OUT] Width of ParmEdit's tool and title },
Invalid { Optional text describing this parameter },
1 { Height of the edit field of the text option });
Example 2:
ModeOptions[0] = GetPhrase("OffLabel");
ModeOptions[1] = GetPhrase("OnLabel");
ModeOptions[2] = GetPhrase("AutoLabel");
ModeOptions[3] = GetPhrase("ManualLabel");
{***** OperatingMode *****}
ParmEditObj[0] = \UntypedParameterEdit(Left { Placement coordinate },
Bottom { Placement coordinate },
Right { Placement coordinate },
Top { Placement coordinate },
Parms[#OperatingMode] { The Parameter value to alter },
ParmDefs[#OperatingMode] { The code pointer to the parameter },
"Operating mode" { The title to display },
&(SubWaitClose[0]) { Wait to close },
DialogRoot { Root dialog calling this control },
1 { Index of the Parameter type selection },
TitleWidth { Width alloted for the Title },
Invalid { True to show "Drawn Tag Property" },
1 { Focus ID },
Invalid { How text option translation is handled },
Invalid { [OUT] Width of ParmEdit's tool and title },
Invalid { Optional text describing this parameter },
Invalid { Height of the edit field of the text option },
0 { Minimum limit of the numeric option },
3 { Maximum limit of the numeric option },
False { TRUE to display the numeric option as spinbox },
ModeOptions { Valid to display the numeric option as a droplist });
