PPhraseEdit
(Dialog Library)
Description: |
Language-sensitive, parameter-setting editfield. This module draws an editfield with (optional) title and bevel. Recommended in place of the older PEditField.
|
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 | PRadioButtons | PSecBit | PSelectObject | PServerListName | PSpinbox | PTimeZone | PTypeToggle | SiteDispParms |
Format: | \DialogLibrary.PPhraseEdit(ParmNum, Title, FocusID[, Trigger, View, DrawBevel, VertAlign, AlignTitle, MinVal, MaxVal, PrivNotReq, Style, PrefixValue, SuffixValue, PlaceHolderText]) |
Parameters: |
ParmNum |
Required. Any numeric expression giving the parameter number (from 0) in the caller to alter. |
Title |
An optional parameter that is any text expression to be used as a title for the field. |
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). |
Trigger | ||||||||
Optional. Trigger provides feedback. While editing, the value will be 0. When editing is complete (tab, enter or loss of focus) the value will change to non-zero: 1 if enter is pressed, 2 otherwise. | ||||||||
View | ||||||||
An optional parameter indicating how to display the editfield , as follows. The default value is 2 if FocusID is 0 and 1 otherwise.
This parameter may be used to force an editfield with a FocusID of 0 to display normally, rather than allowing it to default to its grayed color. |
DrawBevel | ||||||||
Optional Boolean expression that when set to TRUE, causes a bevel to be drawn around the control. Defaults to TRUE. If the editfield is beveled, its size will become fixed and will be the same as that for a droplist. | ||||||||
VertAlign | ||||||||
An optional parameter that is any numeric expression that sets the vertical alignment of the editfield according to one of the following options:
Whether the title is included when the vertical alignment is calculated as determined by the value of AlignTitle. The default value is 0. |
AlignTitle | |||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||
MinVal | |||||||||||||||||||||||||||||||||
An optional parameter that is any expression giving the minimum value or minimum number of characters to be accepted by the editfield (depending on the data type). This value may be a decimal, octal or hexadecimal value. If this parameter is valid and a value less than MinVal is entered in the field (or there are too few characters, in the case of text value), the variable set by the field will revert to the previous value. No default | |||||||||||||||||||||||||||||||||
MaxVal | |||||||||||||||||||||||||||||||||
An optional parameter that is any numeric expression giving the maximum value or maximum number of characters to be accepted by the editfield (depending on the data type). This value may be a decimal, octal or hexadecimal value. If this parameter is valid and a value greater than MaxVal is entered in the field (or there are too many characters, in the case of text value), the variable set by the field will revert to the previous value. | |||||||||||||||||||||||||||||||||
PrivNotReq | |||||||||||||||||||||||||||||||||
An optional parameter that is any logical expression. If set to true (non-0), anyone can change the value in this editfield. If set to FALSE (0), only those users whose user accounts have been granted the "TagModify" privilege may set it. The default value is false. | |||||||||||||||||||||||||||||||||
Style | |||||||||||||||||||||||||||||||||
An optional parameter indicating the style of the PEditField object. It is a bit-wise field made up of the sum of the following values, to yield the desired effects.
If neither values 4 or 8 are set, input is passed to script code as typed. |
PrefixValue |
An optional parameter indicating the text expression that should be displayed immediately before (i.e. to the left of) the editable part of the control. |
SuffixValue |
An optional parameter indicating the text expression that should be displayed immediately after (i.e. to the right of) the editable part of the control. No Default |
PlaceholderText |
Optional text to be displayed in the field when there is otherwise no valid value. Typically provides context or instructions to the user. This is not a default value for the parameter. |
Comments: |
This module is a member of the VTScada Dialog Library and must therefore be called from within a GUITransform and prefaced by \DialogLibrary.. When more than one language is enabled in the application, a phrase-editing button is provided at the right edge of the field. Optionally, the phrase editor will open automatically when VTScada detects that new or untranslated text is entered into the field. 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 value in the editfield. Usual height: 45 pixels. |
Examples:
GUITransform(10, 215, 225, 45, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, \DialogLibrary.PPhraseEdit(1, \GetPhrase("AddDotDotDotLabel"), TRUE { ID }, 0 { trigger }, 2, 0));
Notice in the above example that the last parameter could have been omitted, because it is optional and its setting matches the default.