PhraseEdit

(System Library)

Description:

Language-sensitive editfield. This module draws an editfield with (optional) title and bevel. Recommended in place of the older Edit function.

Returns: Nothing (See PhraseID parameter)
Usage: Steady State only.
Function Groups: Graphics
Related to: PhraseDroplist
Format: System.PhraseEdit(X1, Y1, X2, Y2, Title, PhraseID, ID[, Trigger, View, DrawBevel, VertAlign, AlignTitle, MinVal, MaxVal, Style, PrefixValue, PostfixValue, BGColor, FGColor, FontParm, TitleBGColor, TitleFGColor, BevelColor, PlaceHolder])
Parameters:  
X1
Required. Any numeric expression giving the X coordinate on the screen of one side of the edit field.
Y1
Required. Any numeric expression giving the Y coordinate on the screen of either the top or bottom of the edit field.
X2
Required. Any numeric expression giving the X coordinate on the screen of the side of the edit field opposite to X1.
Y2
Required. Any numeric expression giving the Y coordinate on the screen of the top or bottom of the edit field, whichever is the opposite of Y1.
Title
Optional. The text expression to be used as a title for the field. Set Invalid if not shown.
PhraseID
Required. Output variable. Set to the phrase ID of the new text.
ID
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 numeric. Set when the text changes and provides feedback as follows.

  • Initially set to Invalid.
  • Set to 0 while the phrase editor dialog is open
  • Set to Invalid if user opens the phrase editor manually and does not change the PhraseID
  • Set to 1 if the user selects a different PhraseID using the phrase editor dialog
View
Optional numeric. Directs how to display the editfield , as follows.

View

Display mode

0

Invisible

1

Normal (color scheme - no graying)

2

Grayed-out (only if FocusID is 0)

3Non-grayed text on a type 2 background.
DrawBevel
Optional Boolean. Set to TRUE to draw a bevel around the control.
VertAlign
Optional numeric. Sets the vertical alignment of the editfield according to one of the following options:

VertAlign

Vertical Alignment

0

Top

1

Center

2

Bottom

Whether the title is included when the vertical alignment is calculated as determined by the value of AlignTitle.

AlignTitle
Optional Boolean. 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.
MinVal
Optional. The minimum acceptable value.
MaxVal
Optional. The maximum acceptable value.
Style

An optional parameter indicating the style of the EditField object. It is a bit-wise field made up of the sum of the following values, to yield the desired effects.

(See: Bitwise Parameters & Operations)

Bit

Value

Definition

0

1

Reserved for bit compatibility with WinComboCtrl, and should be set to "0"

1

2

Reserved for bit compatibility with WinComboCtrl, and should be set to "0"

2

4

Input is converted to all uppercase (note 1)

3

8

Input is converted to all lowercase (note 1)

4

16

Input is masked. Any characters typed will appear as asterisks. This is useful for such things as password fields

5

32

Multiline editing. Setting this bit causes a typed <CR> (Enter or Return) to be interpreted as "move to the start of the next line". Text that contains <CR> characters has a line break inserted at each

6

64

Reserved

7

128

8

256

Reserved

9

512

Not used. Height is defined by \EditHt or TEditHt (with title).

If neither values 4 or 8 are set, input is passed to script code as typed.

PrefixValue
Optional text. An expression that should be displayed immediately before (i.e. to the left of) the editable part of the control.
SuffixValue
Optional text. An expression that should be displayed immediately after (i.e. to the right of) the editable part of the control. No Default
BGColor
Optional background color of the edit box
FGColor
Optional foreground color of the edit box
FontParm
Optional Font value.
TitleBGColor
Optional. Background color under title

TitleFGColor

Optional. Foreground (text) color of the title.
BevelColor

Optional. Color of the bevel line.

PlaceHolder

Optional text. Information to display in place of invalid entry. Typically a phrase describing how the field is to be used.
Comments:

Allows a user to enter a multilingual phrase. Input is done in the user's active language and a pop-up dialog is available for editing all other languages in the application.

If a new phrase is typed, the dialog will automatically open to allow the user to provide translations. If an existing phrase is typed, an indicator appears if there are missing translations. The dialog will not pop up in this case.

If a phrase is typed that has multiple matching entries (homographs) then a dialog will open to allow selection and modification of the matches.

Examples: