DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

VtText(VTCL)


VtText -- create Text widget, return widget name

Syntax

VtText widgetName [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 (CSG)
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 (C)
When set, turns off echoing.

-readOnly (C)
When set, disables editing of the text widget.

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

-textVariable string (CS)
Updates the interpreter variable string with the widget value. The update happens under the same conditions that would invoke -callback, but before -callback is called. Setting a value into the interpreter variable updates the Text widget as if setting -value on the widget.

-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)
Set to TRUE for a vertical scroll bar, otherwise FALSE. The default value is FALSE. This is ignored in character mode.

-wordWrap (CS)
When set, turns word wrap on. (Word wrap does not work in character mode.)

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.

Errors


CREATE_ONLY
can specify option only at create time

FONT_WIDTHS
can't determine font widths for columns setting

FILE_READ
couldn't read the server local file

Standard errors
See ``Tcl widget creation errors'' in SCO Visual Tcl Programmer's Guide and Reference.

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003