Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Unified Engineering

TEXT Gadget

  • Last UpdatedNov 07, 2024
  • 3 minute read

Members

Name

Type

Purpose

Val

STRING
Get/Set

Set or get the contents of STRING type TEXT field.

Val

REAL
Get/Set

Set or get the contents of REAL type TEXT field.

Val

BOOLEAN
Get/Set

Set or get the contents of BOOLEAN type TEXT field.

Val

'AS DEFINED
Get/Set

Set or get the contents of the field according to you defined type.

DataType

STRING
Get Only

Get the type of the field.

Echo

BOOLEAN
Get Only

Get the Echo Status.

No-echo means that typed characters will all appear as asterisks.

Format

STRING
Get Only

Get the name of the format object associated with the field.

Scroll

REAL
Get Only

Get the Scroll Width.

ValidateCall

STRING
Get/Set

Set/get User-defined validation callback.

Editable

BOOLEAN
Get/Set

Controls the ability to interactively edit the content of a text field.

Methods

Name

Result

Purpose

FullName()

STRING

Get the full gadget name, for example, '!!Form.gadget'.

Name()

STRING

Get the gadget's name, for example, 'gadget'.

Owner()

FORM

Get owning form.

Clear()

NO RESULT

Clear gadget contents.

SetEditable(BOOLEAN)

NO RESULT

Sets the editable status for the field.

SetFocus()

NO RESULT

Move keyboard focus to this gadget.

SetToolTip(STRING)

NO RESULT

Sets or edits the text of the TOOLTIP.

Refresh()

NO RESULT

Refreshes the display of the gadget.

SetValue(ANY value,BOOLEAN validate)

NO RESULT

Sets the value of the field, checking for valid type and format.

If validate is TRUE, the validation callback will be executed.

GetPickedPopup()

MENU

Returns the last picked pop-up menu for the gadget.

Shown()

BOOLEAN

Get ‘shown’ status.

Type()

STRING

Get the gadget type as a string, i. e. 'TEXT'.

Seteditable( STRING attrib,REAL value)

NO RESULT

Specify value of named attribute.

Currently the only attribute supported is HANDLEMODIFY which determines when the text MODIFIED events are fired. It has values:

0 MODIFIED events off (default).

1 Generate MODIFIED event for first user modification.

2 Generate MODIFIED event for all user modifications.

Command

The TEXT command defines a text field gadget which supports data values of a given type.

The following can also be specified; Gadget position, tag, size, callback, anchor and tooltip; maximum length of the string that may be scrolled in the gadget; the name of a format object which says how a value is to appear as text or be interpreted; that text entered is not echoed as typed, but appears as asterisks (for entering passwords, for example); that the field contents can be seen but not edited.

You can define the TEXT object to be either PML-controlled, or core-code controlled using the gadget qualifier attribute control type, with values ‘PML' or 'CORE'.

                   .--------<-------------.

                  /                       |

>-- TEXT gname --+-- <fgpos> -------------|

                 +-- CORE ----------------|  Core managed gadget

                 +-- <fgtagw> ------------|

                 +-- <fganch> ------------|

                 +-- TOOLTIP text --------|

                 +-- CALLback text -------*

                 |    .---------<---------.

                 |   /                    |

                 ‘--*-- WIDth integer ----|

                    +-- SCRoll integer ---|

                    +---NOEcho------------*

                    |

                    ‘-- IS --+-- STRING --.

                             +-- REAL ----|

                             +-- BOOLEAN -|

                             ‘-- word ----+- FORMAT gvarnm -.

                                          ‘-----------------+- TOOLTIP text -.

                                                            ‘----------------‘-->

Figure 2:5. Syntax Graph: Setting Up a TEXT Object

The IS word syntax allows for any user defined data type to be used, but this will only work satisfactorily if a suitable FORMAT object is supplied.

Note:
The maximum string length (SCROLL integer) is 256 characters, and the default if you do not specify a length is 132.
It is bad practice to place one gadget on top of another. This may lead to gadgets being obscured.

Related Links
TitleResults for “How to create a CRG?”Also Available in