PEditField
(Dialog Library)
Description: |
Parameter Setting Editfield. This module draws an editfield with (optional) title and bevel. Note: PPhraseEdit is recommended for use instead of PEditField in most situations where the parameter is text.
|
Returns: | Nothing |
Usage: | Steady State only. |
Function Groups: | Graphics |
Related to: | GUITransform | PAddressEntry | PAlmPriority | PAreaSelect | PCheckBox | PColorEdit | PColorSelect | PContributor | PDroplist | PEditName | PFileChooser | PFileChooser | PHSliderBar | PHueSelect | PImageSelect | PIPAddressList | PIPListenerGroup | PMultiCheckBox | PPageSelect | PPhraseEdit | PRadioButtons | PSecBit | PSelectObject | PServerListName | PSpinbox | PTimeZone | PTypeToggle | SiteDispParms |
Format: | \DialogLibrary.PEditField(ParmNum [,Title, DataType, FocusID, Trigger, View, DrawBevel, VertAlign, AlignTitle, LowLimit, HighLimit, PrivNotReq, Style, PrefixValue, PostfixValue, PlaceHolder]) |
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. | ||||||||||||||||
DataType | ||||||||||||||||
Defaults to 4 unless otherwise specified.
For types 0 - 2, if the number entered into the field is prefaced by a "0x" the value is taken to be hexadecimal format, and if it is prefaced by a "0" it is considered to be octal. In either case, the value is converted to decimal format when return is pressed or the focus is lost. |
||||||||||||||||
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. 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 is 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. | |||||||||||||||||||||||||||||||||
LowLimit | |||||||||||||||||||||||||||||||||
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 LowLimit 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 | |||||||||||||||||||||||||||||||||
HighLimit | |||||||||||||||||||||||||||||||||
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 HighLimit 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 |
PlaceHolder |
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 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. The height of the editfield is constant, with the horizontal boundaries of its calling transform defining its width, and the vertical boundaries of its calling transform defining the boundaries in which it is to be confined vertically, which will include the added height bevel, but may or may not include the title, depending on the alignment used. Usual height: 45 pixels. |
Examples:
GUITransform(10, 215, 225, 15, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, \DialogLibrary.PEditField(1 { Parm num }, \GetPhrase("Your_Title") { Title }, 3 { Type float }, TRUE { FocusID }, 0 { Trigger not req'd }, Invalid { Use default view }, 0 { No bevel }, Invalid { Default alignment }, 1 { Align title }, 98.6 { Minimum value }, Invalid { No maximum value }));
Notice in the above example that the last parameter could have been omitted, because it is optional and its setting matches the default.