NumericParameterEdit

(VTScada-Layer function. Must be called with a leading backslash.)

Description: Wrapper for ParameterEdit, used when adding a numeric parameter to a control.
Returns: Self
Usage: Steady State only.
Function Groups: Basic Module, Variable
Related to: ParameterEdit| ColorParameterEdit | TagParameterEdit
Format: NumericParameterEdit(Left, Bottom, Right, Top, ParmVal, ParmCodePtr, TagObjPreferred, Title, PtrWaitClose, DialogRoot, MinLimit, MaxLimit, PTypeIdx[, TitleWidth, ShowDrawnTagProperty, FocusID, Type, IsSpinBox, ToolTitleWidthOut, Description, 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.
TagObjPreferred
Set to TRUE to obtain a tag object when possible.
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.
MinLimit
Minimum limit of the selection.
MaxLimit
Maximum limit of the selection.
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.
Type
Optional value specifying the type for the parameter. Defaults to Double.
IsSpinBox
Optional Boolean. When TRUE the numeric option is displayed as a spin box.
ToolTitleWidthOut
Optional numeric output value. Holds the width of the parameter edit's tool and title.
Description
Optional text describing this parameter.
DroplistChoices
Optional. Dynamic array. Contains the array of labels for a droplist. If it is valid, the NumericParamterEdit's value will be displayed as a droplist.
Comments:

Automatically determines what module to use for display and entry of the existing value.

If DroplistChoices is valid, selecting the first entry in the droplist sets the value to 0, the second to 1...

Example #1:

ParmEditObj = \NumericParameterEdit(0, 2 * (EditHt + Space), PanelWd, 0,
                          Parms.DisableTooltip      { Parm to disable the tool tip },
                          ParmDefs.DisableTooltip   { Pointer to Parm Code     },
                          0                         { The tooltip is not a tag },
                          \GetPhrase("DisableTooltipLabel") { Title            },
                          &SubWaitClose[7]          { Wait to close            },
                          DialogRoot                { Calling dialog window    },
                          0                         { MinLimit                 },
                          1                         { MaxLimit                 },
                          Invalid                   { No index for this parm   },
                          TitleWd                   { Width of the title       },
                          True                      { Show drawn tag property  },
                          1                         { FocusID                  });

Example #2:

FormatOptions[0]      = GetPhrase("BinaryLabel");
FormatOptions[1]      = GetPhrase("OctalLabel");
FormatOptions[2]      = GetPhrase("HexLabel");
FormatOptions[3]      = GetPhrase("DecimalLabel");


{***** IntegerFormat *****}
ParmEditObj[0] = \NumericParameterEdit(Left                                   { Placement coordinate                          },
                                       Bottom                                 { Placement coordinate                          },
                                       Right                                  { Placement coordinate                          },
                                       Top                                    { Placement coordinate                          },
                                       Parms[#IntegerFormat]                  { The Parameter value to alter                  },
                                       ParmDefs[#IntegerFormat]               { The code pointer to the parameter             },
                                       FALSE                                  { Not a tag                                     },
                                       "Data type"                            { The title to display                          },
                                       &(SubWaitClose[0])                     { Wait to close                                 },
                                       DialogRoot                             { Root dialog calling this control              },
                                       Invalid                                { Minimum limit of the selection                },
                                       Invalid                                { Maximum limit of the selection                },
                                       1                                      { Index of the Parameter type selection         },
                                       TitleWidth                             { Width alloted for the Title                   },
                                       Invalid                                { True to show "Drawn Tag Property"             },
                                       1                                      { Focus ID                                      },
                                       Invalid                                { The parameter type                            },
                                       False                                  { Not a spinbox                                 },
                                       Invalid                                { [OUT] Width of ParmEdit's tool and title      },
                                       Invalid                                { Optional text describing this parameter       },
                                       FormatOptions                          { Is a droplist                                 });