The class of the editable-text control (and super class of a multi-line-editable-text
control). These controls can accept text which can be edited by the
user, and which is displayed surrounded by a box. The edited text is
stored as a simple string in the value field of the dialog item.
The text initially displayed can be specified by storing a simple string in the value field. The delayed property controls whether the dialog-item value is updated after every keystroke or only when the user moves to another item.
You can constrain the number of characters, the types of characters
that can be entered, and add characters that display but cannot be
modified in an editable-text widget with template-string and *template-chars*
.
Control
An instance of the editable-text class. This control contains editable text displayed surrounded by a box.
The edited text is stored as a simple string in the value field of the dialog item. The text initially displayed can be specified by storing a simple string in the value field.
The title field is not displayed. If you want to add a title to your
editable-text control, pair it with a static-text
control.
Adding an editable-text control to your form
Click the editable-text tool on the Component toolbar. Move the mouse cursor to the part of the form where you want to place the control, and click again. The control will appear with colored resizing handles.
Note that though an editable-text control can be placed on any parent
window, users can only type into the control if the parent window is
an instance of a class that inherits from dialog-mixin
(for example, a
dialog
),
because of an apparent Operating System constraint. multi-line-editable-text
controls
do not have this limitation.
Controls can only be resized and moved on forms during the design stage; the size and location of everything is fixed on a running form.
Resize the control by clicking the mouse cursor and dragging one of the handles to the new size-point. Release the mouse key when you are satisfied with the new size. Note: resizing the control changes the size of the bounding-box, but not the size of the actual characters inside. Change the font property if you want to change the size of the characters.
Move the control by clicking anywhere on it except a resizing handle and dragging it to a new location on the form. Release the mouse key when you are ready to place the control.
Customizing editable-text control behavior
When user-generated changes appear
The :delayed option controls whether the dialog-item value is updated after every keystroke or only after the user moves to another item on the dialog.
Number, type, and read-only qualities of characters
You can constrain the number of characters, the types of characters
that can be entered, and add characters that display but cannot be
modified in an editable-text widget with template-string and *template-chars*
.
Adding a password
The password property can be set with a non-nil value, and the widget will echo asterisks for each typed character (preventing others who see the screen from knowing what was typed).
See About how to get sample code for creating controls in cgide.htm, which explains how to use the IDE to create such code.
Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.
The documentation is described in introduction.htm and the index is in index.htm.
Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.
Created 2000.10.5.