PSpinbox
(Dialog Library)
Description: |
Parameter Setting Spinbox. This module draws a spinbox with optional label.
|
Returns: | Nothing |
Usage: | Steady State only. |
Function Groups: | Graphics |
Related to: | GUITransform | PAddressEntry | PAlmPriority | PAreaSelect | PCheckBox | PColorEdit | PColorSelect | PContributor | PDroplist | PEditField | PEditName | PFileChooser | PHSliderBar | PHueSelect | PImageSelect | PIPAddressList | PIPListenerGroup | PMultiCheckBox | PPageSelect | PPhraseEdit | PRadioButtons | PSecBit | PSelectObject | PServerListName | PTimeZone | PTypeToggle | SiteDispParms |
Format: | \DialogLibrary.PSpinBox(ParmNum, Label, BoxOnLeft, LowLimit, HighLimit [, Alignment, NumChars, CanEdit, FocusID, TextOption, TextValue, Trigger]) |
Parameters: |
ParmNum | ||||||||||||||||||||||||||||||
Required. Any numeric expression giving the parameter number (from 0) in the caller to alter. | ||||||||||||||||||||||||||||||
Label | ||||||||||||||||||||||||||||||
Required. Any text expression to be used as a label with the spinbox. | ||||||||||||||||||||||||||||||
BoxOnLeft | ||||||||||||||||||||||||||||||
Required. Any logical expression. If true (non-0) the spinbox will appear to the left of the label, if false (0) it will be to the right. Defaults to TRUE. | ||||||||||||||||||||||||||||||
LowLimit | ||||||||||||||||||||||||||||||
Required. Any numeric expression giving the lowest permissible value. If the spinbox is editable and a value less than LowLimit is entered, it will revert to the LowLimit value. | ||||||||||||||||||||||||||||||
HighLimit | ||||||||||||||||||||||||||||||
Required. Any numeric expression giving the highest permissible value. If the spinbox is editable and a value greater than HighLimit is entered, it will revert to the HighLimit value. | ||||||||||||||||||||||||||||||
Alignment | ||||||||||||||||||||||||||||||
An optional parameter that is any numeric expression that sets the alignment of the spinbox and its label according to one of the following options. The default value is 0.
|
NumChars |
An optional parameter that is any numeric expression giving the number of digits wide to make the spinbox. A value of 0 or invalid results in the spinbox being automatically sized to fit the widest number (or text string if TextOption and TextValue are set). The default value is 0. |
CanEdit |
An optional parameter that is any logical expression. If TRUE (non-0), the number in the field may be edited directly, if false (0), it may not. The default value is false. Note that the value of this parameter directly affects the TextOption and TextValue parameters' effectiveness. If CanEdit is true, both are ignored. |
FocusID |
Boolean. If this value is FALSE (0), the field will display its current setting, but cannot be opened (i.e. its value cannot be changed), and will appear disabled (grayed-out). |
TextOption |
An optional parameter that is any text expression used to replace a certain value (expressed by TextValue) in the spinbox field. This parameter will be ignored if CanEdit is true. |
TextValue |
An optional parameter that is any numeric expression for the value in the spinbox that is to be replaced by the text string in TextOption. This parameter will be ignored if CanEdit is true. |
Trigger |
An optional numeric expression. The value in Trigger will become 0 if the user changes the internal buffer (i.e. when the value of the WinEditCtrl as logged in the variable Change transits from invalid to zero). If the user presses any of Enter, the spin box arrows or the arrow buttons on the keyboard, Trigger becomes 1. If the spinbox loses focus, the value of Trigger becomes 2. |
Comments: |
This module is a member of the VTScada Dialog Library and must therefore be called from within a GUITransform and prefaced by \DialogLibrary.. Usual height: 22 pixels. |
Example:
GUITransform(30, 100, 130, 20, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, \DialogLibrary.PSpinbox(4 { Parm num }, \GetPhrase("Your_Title"){ Label }, 1 { Box on left }, 0, 100 { Limits }, 5 { Full align, centered }, 0 { Autosize box }, TRUE { Editable }, TRUE { Focus ID }, \GetPhrase("NoneLabel") { Text option }, 0 { Index of text option }, Trigger { Trigger }));