A text item is used for displaying and editing a single line of text. It must be a child of a panel.
See also multi-line text.
text-create
text-set-value
text-get-value
long ( 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 single-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.
style may be the empty string, or a bit list of:
| wxTE_PROCESS_ENTER | The callback function will receive the event wxEVENT_TYPE_TEXT_ENTER_COMMAND. Note that this will break tab traversal for this panel item under Windows. Single-line text only. |
| wxTE_PASSWORD | The text will be echoed as asterisks. Single-line text only. |
| wxTE_READONLY | The text will not be user-editable. |
| 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. Multi-line text only. |
name gives the group box a name that can be retrieved with window-get-name.
long ( text-set-value long text-id string value)
Set the string value of a text item.
string ( text-get-value long text-id)
Get the string value of a text item.