single line or multi-line.
@beginStyleTable
- @style{wxTE_PROCESS_ENTER}:
+ @style{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).
- @style{wxTE_PROCESS_TAB}:
+ @style{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.
- @style{wxTE_MULTILINE}:
+ @style{wxTE_MULTILINE}
The text control allows multiple lines.
- @style{wxTE_PASSWORD}:
+ @style{wxTE_PASSWORD}
The text will be echoed as asterisks.
- @style{wxTE_READONLY}:
+ @style{wxTE_READONLY}
The text will not be user-editable.
- @style{wxTE_RICH}:
+ @style{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.
- @style{wxTE_RICH2}:
+ @style{wxTE_RICH2}
Use rich text control version 2.0 or 3.0 under Win32, this style is
ignored under other platforms
- @style{wxTE_AUTO_URL}:
+ @style{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.
- @style{wxTE_NOHIDESEL}:
+ @style{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.
- @style{wxHSCROLL}:
+ @style{wxHSCROLL}
A horizontal scrollbar will be created and used, so that text won't
be wrapped. No effect under wxGTK1.
- @style{wxTE_NO_VSCROLL}:
+ @style{wxTE_NO_VSCROLL}
For multiline controls only: vertical scrollbar will never be
created. This limits the amount of text which can be entered into
the control to what can be displayed in it under MSW but not under
GTK2. Currently not implemented for the other platforms.
- @style{wxTE_LEFT}:
+ @style{wxTE_LEFT}
The text in the control will be left-justified (default).
- @style{wxTE_CENTRE}:
+ @style{wxTE_CENTRE}
The text in the control will be centered (currently wxMSW and
wxGTK2 only).
- @style{wxTE_RIGHT}:
+ @style{wxTE_RIGHT}
The text in the control will be right-justified (currently wxMSW
and wxGTK2 only).
- @style{wxTE_DONTWRAP}:
+ @style{wxTE_DONTWRAP}
Same as wxHSCROLL style: don't wrap at all, show horizontal
scrollbar instead.
- @style{wxTE_CHARWRAP}:
+ @style{wxTE_CHARWRAP}
Wrap the lines too long to be shown entirely at any position
(wxUniv and wxGTK2 only).
- @style{wxTE_WORDWRAP}:
+ @style{wxTE_WORDWRAP}
Wrap the lines too long to be shown entirely at word boundaries
(wxUniv and wxGTK2 only).
- @style{wxTE_BESTWRAP}:
+ @style{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).
- @style{wxTE_CAPITALIZE}:
+ @style{wxTE_CAPITALIZE}
On PocketPC and Smartphone, causes the first letter to be
capitalized.
@endStyleTable
Notice that currently this function is only implemented in wxGTK2 and wxMSW
ports and does nothing under the other platforms.
- @wxsince{2.9.0}
+ @since 2.9.0
@returns @true if the auto-completion was enabled or @false if the
operation failed, typically because auto-completion is
Notice that currently this function is only implemented in wxGTK2 port and does
nothing under the other platforms.
- @wxsince{2.9.0}
+ @since 2.9.0
@returns @true if the auto-completion was enabled or @false if the
operation failed, typically because auto-completion is
This is the only difference with SetValue().
See @ref overview_progevent "this topic" for more information.
- @wxsince{2.7.1}
+ @since 2.7.1
@param value
The new value to set. It may contain newline characters if the text control
@c GetValue().empty() but can be much more efficient for the multiline
controls containing big amounts of text.
- @wxsince{2.7.1}
+ @since 2.7.1
*/
bool IsEmpty() const;
void SetModified(bool modified);
/**
- Selects the text starting at the first position up to (but not including) the
- character at the last position. If both parameters are equal to -1 all text
- in the control is selected.
+ Selects the text starting at the first position up to (but not
+ including) the character at the last position. If both parameters are
+ equal to -1 all text in the control is selected.
@param from
The first position.
@param to
The last position.
+
+ @see SelectAll()
*/
virtual void SetSelection(long from, long to);
+ /**
+ Selects all text in the control.
+
+ @see SetSelection()
+ */
+ virtual void SelectAll();
+
/**
Changes the style of the given range. If any attribute within @a style is
not set, the corresponding attribute from GetDefaultStyle() is used.
//@{
/**
- Operator definitions for appending to a text control, for example:
+ Operator definitions for appending to a text control.
*/
- wxTextCtrl operator(const wxString& s);
- wxTextCtrl operator(int i);
- wxTextCtrl operator(long i);
- wxTextCtrl operator(float f);
- wxTextCtrl operator(double d);
- wxTextCtrl operator(char c);
+ wxTextCtrl& operator<<(const wxString& s);
+ wxTextCtrl& operator<<(int i);
+ wxTextCtrl& operator<<(long i);
+ wxTextCtrl& operator<<(float f);
+ wxTextCtrl& operator<<(double d);
+ wxTextCtrl& operator<<(char c);
+ wxTextCtrl& operator<<(wchar_t c);
//@}
};
This class can be used to (temporarily) redirect all output sent to a C++
ostream object to a wxTextCtrl instead.
- @b NB: Some compilers and/or build configurations don't support multiply
+ @note Some compilers and/or build configurations don't support multiply
inheriting wxTextCtrl from @c std::streambuf in which
case this class is not compiled in. You also must have @c wxUSE_STD_IOSTREAM
option on (i.e. set to 1) in your setup.h to be able to use it. Under Unix,