MultiCheckboxParameterEdit
(VTScada-Layer function. Must be called with a leading backslash.)
Description: |
(A wrapper for NumericParameterEdit.) Use this function to make any number of check boxes in a group. |
Returns: | Self |
Usage: | Steady State only. |
Function Groups: | Basic Module, Variable |
Related to: | NumericParameterEdit |
Format: | MultiCheckboxParameterEdit(Left, Right, Top, ParmPtrArray, CodePtrArray, TitleArray, PtrWaitClose, DialogRoot[, FIDArray, ManualWidth, PTypePtrArray, DescArray])) |
Parameters: |
Left |
Required numeric. Left placement coordinate. |
Right |
Required numeric. Right placement coordinate. |
Top |
Required numeric. Top placement coordinate. |
ParmPtrArray |
Required. An array of pointers to the value of each parameter. |
CodePtrArray |
Required. An array of pointers to the definition of each parameter. |
TitleArray |
Required. An array of titles to display. |
PtrWaitClose |
Required. A pointer to the SubwaitClose of that panel if applicable. (Note that only one is used, rather than an array. It will trigger if any of the checkboxes are being edited.) |
DialogRoot |
Required. The root dialog calling this control. It will be passed on to each individual check box's NumericParameterEdit. |
FIDArray |
Optional. An array of Focus IDs for each check box. This allows for conditional statements to change the ability of each check box to interact. Each defaults to TRUE if Invalid. |
ManualWidth |
Optional numeric. Use to provide a value for consideration when calculating the width needed for titles. A manual width smaller than the required width of a title will be ignored. |
PTypePtrArray |
Optional. An array of PTypes that are handed directly into each checkbox's numericParameterEdit. |
DescArray |
Optional. An array of descriptions that are placed under each related title. This allows for comments, clarification, or the splitting of a long title. |
Comments: |
There are two public variables that can be accessed from the object value returned from the wrapper. These are "Height" and "TitlesWidth". "Height" is the total height of all the checkboxes and the space between them. "TitlesWidth" is the largest width that the titles in the wrapper require in order to be displayed properly. (Or, the manual width if one is provided and it is greater than that of any of the titles.) |
Example:
{ set up variables for multiple checkboxes... } ParmPtrArray = System.MakeArray(&Parms.QueryChange, &Parms.DisableControl, &Parms.DisableNavigation, &Parms.DisableTooltip); CodePtrArray = System.MakeArray(&ParmDefs.QueryChange, &ParmDefs.DisableControl, &ParmDefs.DisableNavigation, &ParmDefs.DisableTooltip); TitleArray = System.MakeArray("ConfirmationDialogLabel", "DisableControlLabel", "DisableNavigationLabel", "DisableTooltipLabel"); ] ] Panel [ {... } { Options } PEObj[1] = MultiCheckboxParameterEdit(Space, #PanelWd - Space, PEBot[0] + 2*Space + TitleSpace { Position }, ParmPtrArray, CodePtrArray { Parm Val/Def }, TitleArray, &(SubWaitClose[1]) { Titles/Wait }, DialogRoot, Invalid { Root/FIDs }, TitleWd - Space, Invalid { Width/PTypes }, DescArray { Descriptions }); ]