A multi-line text item is able to show several lines of text, unlike the single line text item. It must be the child of a panel.
Under Windows, there is an extended range of functions. Some take character positions - a single integer which can identify a character position - and others take line and character numbers. If you want to use a function that takes one form, but you only have the other, you can convert between them using a function such as multi-text-xy-to-position or multi-text-position-to-line. Note that line and character numbers start from zero.
multi-text-create
multi-text-copy
multi-text-cut
multi-text-get-insertion-point
multi-text-get-last-position
multi-text-get-line-length
multi-text-get-line-length
multi-text-get-number-of-lines
multi-text-get-value
multi-text-set-value
multi-text-paste
multi-text-position-to-char
multi-text-position-to-line
multi-text-remove
multi-text-replace
multi-text-set-insertion-point
multi-text-set-selection
multi-text-show-position
multi-text-write
multi-text-xy-to-position
long ( multi-text-create long panel-id string callback string label
optional string value optional long x optional long y
optional long width optional long height optional string style optional string name)
Creates a multi-line text item on the given panel. The callback may be the empty string ("'') to denote no callback, or a word or string for the function name. The function will be called when return is pressed in the text item, with the text item ID as argument. The default value is optional.
If no position is given, the panel item is placed after the last item. The value -1 may be passed to denote a default, so that the position may be left unspecified and the size given.
The style parameter can be a bit list of the following:
wxHSCROLL | A horizontal scrollbar will be displayed. If wxHSCROLL is omitted, only a vertical scrollbar is displayed, and lines will be wrapped. This parameter is ignored under XView. |
wxREADONLY | The text is read-only (not XView). |
name gives the multitext a name that can be retrieved with window-get-name.
long ( multi-text-copy long window-id)
Copies the selected text to the clipboard. Windows only.
long ( multi-text-cut long window-id)
Copies the selected text to the clipboard, then removes the selection. Windows only.
long ( multi-text-get-insertion-point long window-id)
Returns the insertion point. Windows only.
long ( multi-text-get-last-position long window-id)
Returns the final position in the text window. Windows only.
long ( multi-text-get-line-length long window-id long line-no)
Returns the length of the text at line line-no. Windows only.
long ( multi-text-get-line-text long window-id long line-no)
Returns the text at line-no.
long ( multi-text-get-number-of-lines long window-id)
Returns the number of lines in the text window. Windows only.
string ( multi-text-get-value long multi-text-item)
Get the multi-text item's string value.
long ( multi-text-set-value long multi-text-item string value)
Set the multi-text item's string value.
long ( multi-text-paste long window-id)
Pastes the text (if any) from the clipboard to the text window. Windows only.
long ( multi-text-position-to-char long window-id long pos)
Returns the character position (starting from zero) for the given index position. Windows only.
long ( multi-text-position-to-line long window-id long pos)
Returns the line number (starting from zero) for the given index position. Windows only.
long ( multi-text-remove long window-id long start-pos long end-pos)
Removes the text between the given span selection. Windows only.
long ( multi-text-replace long window-id long start-pos long end-pos string text)
Replaces the text between the given span selection with the given text.
long ( multi-text-set-insertion-point long window-id long pos)
Sets the insertion point to the given index position. Windows only.
long ( multi-text-set-selection long window-id long start-pos long end-pos)
Sets the selection to the given span of text. Windows only.
long ( multi-text-show-position long window-id long pos)
Shows the text at the given index position. Windows only.
long ( multi-text-write long window-id string text)
Writes the given string into the multitext, at the current cursor point. Windows only.
long ( multi-text-xy-to-position long window-id long char-position long line)
Converts the character and line number (each starting from zero) to a position.