Arguments: widget &key return-crlf
Returns as a string the text of a window or dialog-item. For a
text control or a text-edit-pane
, the
returned text is the contents of the control or pane, while for other
windows the title
is returned. Note that for a text control, the returned text will
always be the actual text that is presently displayed in the control,
even if the user has just typed it in and the value of the dialog-item
has not yet been updated to reflect the new text because the control
still has the keyboard focus.
If return-crlf is true, any line
breaks in the control will be represented by CR/LF's (a carriage
return character followed by a linefeed character) in the string that
is returned. If return-crlf is nil
(the default), then the returned string will
contain single LF's instead. The trade-off is that single LF's are the
newline convention in Allegro, but the Windows multi-line text editing
control (used in CG for both rich-edit-pane
and text-edit-pane
windows) internally uses CR/LF's. Returning CR/LF's may be necessary
if your application requires that character positions in a string
obtained from a text control need to match the internal positions used
by functions such as get-selection and set-selection.
The length of the returned string is returned as a second value.
See also set-text, which can be used to set the text in a text-edit-pane.
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.