VtText(VTCL)

VtText(VTCL)


VtText -- create text object, return widget name

Syntax

VtText object_name [options]

Description

Creates a Text object and returns the widget name. Text fields display text in a box. The text is editable by default, but you can make it read-only. You can create a single line of text, or multiple lines. Text fields are useful for displaying text or for fields where the user needs to enter a value.

Options

-callback cmd (C)
Sets the callback to call when a return keypress is received in a single line text object.

Additional callback keys:

value
contents of the text widget.

-columns integer (CS)
Make the object integer number of columns wide. This means that integer characters are shown. In the graphical environment this will make the width of the object integer * Max_Charwidth wide.

-filename string (CS)
Sets a file (named string) whose contents will be displayed in the text widget.

-horizontalScrollBar boolean (CS)
Sets whether to include a horizontal scrollbar. If TRUE a horizontal scrollbar is displayed. The default value is FALSE. This option is ignored in character mode.

-losingFocusCallback cmd (C)
Sets the command to call when the text widget loses focus. This routine is called regardless of whether the text has changed.
Additional callback keys:

value
value of the text widget.

-noEcho (CS)
This is a flag: specifies whether or not echoing should be turned off.

-readOnly (C)
This is a flag: when set, disables editing of the text widget.

-rows integer (CS)
Sets the number of character rows displayed in an object.

-value string (CSG)
Sets the string value of the text.

-valueChangedCallback cmd (CS)
Sets the command called after text is inserted into or deleted from the widget.

Additional callback keys:

value
value of the object.

-verticalScrollBar boolean (CS)
This is a flag: set to TRUE for a vertical scroll bar, otherwise FALSE. The default value is FALSE. This is ignored in character mode.

-wordWrap (C)
Sets word wrap on.

CHARM editing keys

The following editing keys are available in character mode:

<Bksp>
Backspace/delete.

<Ctrl>B
Backspace/delete.

<Ctrl>D
Move down a line.

<Ctrl>E
End of line/end of text.

<Ctrl>I
Tab.

<Ctrl>J
New line/return.

<Ctrl>K
Return/Tab.

<Ctrl>L
Move cursor right.

<Ctrl>M
Return.

<Ctrl>T
Start of line/top text.

See also