EDITTEXT


PLBCMP GUI Only

square.png Properties

square.png Events

square.png Methods

square.png Instructions

 

The EDITTEXT instruction defines an object variable for a standard GUI editable text field. An EDITTEXT control, sometimes called a text box or edit control, displays information entered at design time, entered by the user, or assigned to the control in code at execution time. To define an EDITTEXT, use one of the following statement formats:

 

(1)

[label]

EDITTEXT

[%]

(2)

[label]

EDITTEXT

(arraysize)

(3)

[label]

EDITTEXT

^

(4)

[label]

EDITTEXT

^,{target}

(5)

[label]

EDITTEXT

^(arraysize)

(6)

[label]

EDITTEXT

^(arraysize),({target}),...,({target})

 

Where:

label

Optional. A Data Label.

%

Optional. Denotes the item as being GLOBAL.

arraysize

Required. An integer decimal constant, CONST variable, or EQUATEd value indicating the number of array items.

^

Optional. Denotes the item as being a POINTER.

target

Required. The name of a previously defined data item of the same type.

Flags Affected: NONE

Note the following:

  1. An EDITTEXT contains two items. The entire EDITTEXT is referenced as item number zero. Any selected text within the EDITTEXT field is referenced as item number one.

  2. Items are accessible through the SETITEM or GETITEM instructions.

  3. This object may optionally have a border, scroll bars, multiple lines, word wrap capability, and may be set to a read only state by various properties of the control.

  4. EDITTEXT objects support the clipboard functions of cut, copy, and paste. During paste operations, the data being passed to the object is verified for the EDITTYPE values of an INTEGER or DECIMAL. If the current data in the clipboard is not consistent with these types, the paste operation is not performed and a beep occurs.

  5. Input data is scrolled left when the object is filled if the ALIGNMENT property is set to None or Left. With any other ALIGNMENT property setting, data is truncated within the bounds of the object.

  6. Multi-dimension arrays are supported up to a maximum of fourteen dimensions.

  7. The ^ denotes a Pointer Variable.

  8. Although an EDITTEXT may be defined as Global, it is DESTROYed during a CHAIN instruction.

  9. When using the PL/B Web Server, an EDITTEXT object uses the CSS classes named 'ww0' and 'ww1' defined in the 'plbwebbasic.css' file. By using these classes, the end-user application behaviors for the HTML wrap attribute can be changed using user-custom classes. See the runtime keyword named 'PLBWEB_USER_CSS={filename.css}' for more information on user defined classes. The default 'plbwebbasic.css' class setting for the 'ww0' class is set to 'no wrap' and the 'ww1' class is set to 'wrap'

  10. Any character below 0x20 sent to an EDITTEXT gives specific behaviors implemented by an OS or browser.

  11. If an EDITEXT is created using a non-null CUETEXT property string value, the EDITEXT object is always created as a single line EDITTEXT.

 

 

See Also: Example Code, Object Definitions, Object Output Instructions

 



PL/B Language Reference EDITNUMBER ERROR