multi-line-editable-text

Class

Package: common-graphics

Class

The class of the multi-line-editable-text control.

Control

Instance of the :multi-line-editable-text. This control behaves similarly to editable-text, but covers more than one line and has vertical scrollbars whenever the size of the text block exceeds the size of the window. Text on long lines wraps to fit in the window when the horizontal scrollbar is not enabled, and continues to wrap even after resizing.

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 a multi-line-editable-text control to your form

Click the multi-line-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.

Resizing and moving the control

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 multi-line-editable-text control behavior

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).

Adding scrollbars to multi-line-editable-text controls

Set the scrollbars property to t (use both scrollbars), :vertical (use vertical scrollbars only), or :horizontal (use the horizontal scrollbar only). If the value of this property is nil, scrollbars will not appear.

Note: If the horizontal scrollbar is not enabled, then the text will wrap automatically at space boundaries to prevent the text from extending off the right edge of the control. This is done at display time by Windows without adding newline characters, so the text will re-wrap if the dialog-item is resized.

Making multi-line-editable-text controls read-only or not

Set the read-only property. T means read-only, nil means editable. True, which prevents the user from typing into the widget, can be handy for displaying scrolling text that the user should not change.

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*.

When user-generated changes appear

The delayed property controls whether the dialog-item value is updated after every keystroke or only after the user moves to another item on the dialog.

Data in a multi-line-editable-text

The generic function text-range can be used to extract data from a multi-line-editable-text control.

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.