TextControl

Help Contents GUI programming TextControls TextControl
TextControls TextControlDestroy

TextControl parent name value
(TextControl parent name)
(TextControl parent name value onChange onEnter style pos size)


outputs a new TextControl on the parent (a Frame or a Graph, or if [] the main Graph).

value can be anything that can be converted to a word. That word is shown in the TextControl at the beginning.

style is the window style and can be a combination of the following constants:

wxTE_PROCESS_ENTER The control will generate the event wxEVT_COMMAND_TEXT_ENTER (otherwise pressing Enter key is either processed internally by the control or used for navigation between dialog controls).

wxTE_PROCESS_TAB The control will receive wxEVT_CHAR events for TAB pressed - normally, TAB is used for passing to the next control in a dialog instead. For the control created with this style, you can still use Ctrl-Enter to pass to the next control from the keyboard.

wxTE_MULTILINE The text control allows multiple lines.

wxTE_PASSWORD The text will be echoed as asterisks.

wxTE_READONLY The text will not be user-editable.

wxTE_RICH Use rich text control under Win32, this allows to have more than 64KB of text in the control even under Win9x. This style is ignored under other platforms.

wxTE_RICH2 Use rich text control version 2.0 or 3.0 under Win32, this style is ignored under other platforms

wxTE_AUTO_URL Highlight the URLs and generate the wxTextUrlEvents when mouse events occur over them. This style is only supported for wxTE_RICH Win32 and multi-line wxGTK2 text controls.

wxTE_NOHIDESEL By default, the Windows text control doesn't show the selection when it doesn't have focus - use this style to force it to always show it. It doesn't do anything under other platforms.

wxHSCROLL A horizontal scrollbar will be created and used, so that text won't be wrapped. No effect under wxGTK1.

wxTE_LEFT The text in the control will be left-justified (default).

wxTE_CENTRE The text in the control will be centered (currently wxMSW and wxGTK2 only).

wxTE_RIGHT The text in the control will be right-justified (currently wxMSW and wxGTK2 only).

wxTE_DONTWRAP Same as wxHSCROLL style: don't wrap at all, show horizontal scrollbar instead.

wxTE_CHARWRAP Wrap the lines too long to be shown entirely at any position (wxUniv and wxGTK2 only).

wxTE_WORDWRAP Wrap the lines too long to be shown entirely at word boundaries (wxUniv and wxGTK2 only).

wxTE_BESTWRAP Wrap the lines at word boundaries or at any other character if there are words longer than the window width (this is the default).

wxTE_CAPITALIZE On PocketPC and Smartphone, causes the first letter to be capitalized.



pos is the position of the TextControl (a list of two integer numbers, x and y),

size is the size of the TextControl (a list of two integer numbers, width and height).

Example:

t=(TextControl [][TextControl1][This is\
	some multiline\
	text]
	[][]
	wxTE_multiline+wxTE_Rich2+wxTE_NoHideSel
	[0 0][300 200])

Examples:

References:

TextControls TextControlDestroy