WinEditCtrl

(Engine-Level Function)

Description: Windows native edit control. This function returns a value indicating the status of an edit field.
Returns: Numeric
Usage: Steady State only.
Function Groups: Graphics
Related to: DropList | Edit | WinComboCtrl | ZEditField
Format: WinEditCtrl(X0, Y0, X1, Y1, Style, Data [, FocusID, MaxCharacters, Font, BackgroundColor, ForegroundColor, PlaceholderText])
Parameters:  
X0, Y0, X1, Y1   
Required. Coordinates.
Style   

Optional. Default 0. Comprised of a combination of bit values to yield the desired effects. Note that some combinations should not be used as they could be mutually exclusive. For example converting input to all uppercase and to all lowercase (bits 2 and 3 both set).

Bits 0 and 1 are reserved for bit compatibility with WinComboCtrl, and should be set to "0".

Bits 2, 3 and 4 define input character handling. It is reasonable to set bit 2 and 4 or 3 and 4, but not bits 2 and 3. If not set, input is used exactly as typed.

(See: Bitwise Parameters & Operations)

Bit Number

Definition

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

2

Input is converted to all uppercase

3

Input is converted to all lowercase

4

Input is masked. Any characters typed will appear as asterisks. (useful for password fields)

Will not work in combination with bit 5, multi-line editing.

5

Multi-line editing. When set, this bit causes a typed Enter key to be interpreted as "move to the start of the next line".

Text that contains carriage-return & line-feed characters has a line break inserted at each set.

6 Forces the background color to continue being used when the control is disabled, rather than allowing it to gray as it otherwise would.
7 Not used
8 Reserved
9 Reserved
10

Bits 10 and 11 control horizontal alignment as follows:

Bit 10 Bit 11 Alignment
0 0 Left (default)
1 0 Center
0 1 Right
1 1 Do not use
11
Data   
Required. The data to display and possibly edited.
FocusID   

An optional parameter from 0 to 32767 specifying the focus id. If Invalid, negative, or zero, no user interaction is permitted. This value is held in a short.

MaxCharacters   

An optional parameter specifying the maximum number of characters permitted for input. Can not exceed 65535 or be less than 0. Defaults to 32767.
Note that this property is not obeyed in a VTScada Internet Client.

Font  
An optional parameter specifying the font to use.
Note that underlining is not supported.
BackGroundColor  
An optional numeric parameter specifying the background color. Uses an unsigned integer, therefore system colors with negative values may not be specified here. May be any of:
ForegroundColor  
An optional numeric parameter specifying the foreground color. Like BackgroundColor, may not be negative.
PlaceholderText
Optional text that will be shown in the control as a prompt to the user. Vanishes when the user begins entering a value.
Comments: The return value for WinEditCtrl can be one of the following:

Return Value

Meaning

Invalid

Nothing happened or there is a problem with the control

Internal buffer changed or selection made from list.

<CR> (Enter or Return pressed). Only applies to single-line edit controls.

Focus has been lost.

If FocusID is Invalid or less than or equal to "0", the current selection cannot be modified.