Of these, wxTEXT_ALIGNMENT_JUSTIFIED is unimplemented. In future justification
may be supported
when printing or previewing, only.
Of these, wxTEXT_ALIGNMENT_JUSTIFIED is unimplemented. In future justification
may be supported
when printing or previewing, only.
/**
Sets the text effects, a bit list of styles.
The following styles can be passed:
/**
Sets the text effects, a bit list of styles.
The following styles can be passed:
Of these, only wxTEXT_ATTR_EFFECT_CAPITALS and wxTEXT_ATTR_EFFECT_STRIKETHROUGH
are implemented.
wxTEXT_ATTR_EFFECT_CAPITALS capitalises text when displayed (leaving the case
Of these, only wxTEXT_ATTR_EFFECT_CAPITALS and wxTEXT_ATTR_EFFECT_STRIKETHROUGH
are implemented.
wxTEXT_ATTR_EFFECT_CAPITALS capitalises text when displayed (leaving the case
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).
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).
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.
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.
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.
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.
Use rich text control version 2.0 or 3.0 under Win32, this style is
ignored under other platforms
Use rich text control version 2.0 or 3.0 under Win32, this style is
ignored under other platforms
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.
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.
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.
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.
A horizontal scrollbar will be created and used, so that text won't
be wrapped. No effect under wxGTK1.
A horizontal scrollbar will be created and used, so that text won't
be wrapped. No effect under wxGTK1.
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.
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.
Wrap the lines at word boundaries or at any other character if
there are words longer than the window width (this is the default).
Wrap the lines at word boundaries or at any other character if
there are words longer than the window width (this is the default).
@remarks The horizontal scrollbar (wxHSCROLL style flag) will only be
created for multi-line text controls. Without a
horizontal scrollbar, text lines that don't fit in the
@remarks The horizontal scrollbar (wxHSCROLL style flag) will only be
created for multi-line text controls. Without a
horizontal scrollbar, text lines that don't fit in the
character is inserted). Single line controls don't have
a horizontal scrollbar, the text is automatically
scrolled so that the insertion point is always visible.
character is inserted). Single line controls don't have
a horizontal scrollbar, the text is automatically
scrolled so that the insertion point is always visible.
@remarks After the text is appended, the insertion point will be at the
end of the text control. If this behaviour is not
desired, the programmer should use GetInsertionPoint
and SetInsertionPoint.
@remarks After the text is appended, the insertion point will be at the
end of the text control. If this behaviour is not
desired, the programmer should use GetInsertionPoint
and SetInsertionPoint.
text control using the given @e choices.
Notice that currently this function is only implemented in wxGTK2 and wxMSW
ports and does nothing under the other platforms.
text control using the given @e choices.
Notice that currently this function is only implemented in wxGTK2 and wxMSW
ports and does nothing under the other platforms.
@returns @true if the auto-completion was enabled or @false if the
operation failed, typically because auto-completion is
not supported by the current platform.
@returns @true if the auto-completion was enabled or @false if the
operation failed, typically because auto-completion is
not supported by the current platform.
text control using all valid file system paths.
Notice that currently this function is only implemented in wxGTK2 port and does
nothing under the other platforms.
text control using all valid file system paths.
Notice that currently this function is only implemented in wxGTK2 port and does
nothing under the other platforms.
@returns @true if the auto-completion was enabled or @false if the
operation failed, typically because auto-completion is
not supported by the current platform.
@returns @true if the auto-completion was enabled or @false if the
operation failed, typically because auto-completion is
not supported by the current platform.
event.
This is the only difference with SetValue().
See @ref overview_progevent "this topic" for more information.
event.
This is the only difference with SetValue().
See @ref overview_progevent "this topic" for more information.
handler previously by wxWidgets.
Please note that this function doesn't currently work correctly for all keys
under any platform but MSW.
handler previously by wxWidgets.
Please note that this function doesn't currently work correctly for all keys
under any platform but MSW.
@returns The length of the line, or -1 if lineNo was invalid.
*/
int GetLineLength(long lineNo) const;
@returns The length of the line, or -1 if lineNo was invalid.
*/
int GetLineLength(long lineNo) const;
/**
Returns the contents of a given line in the text control, not including
any trailing newline character(s).
/**
Returns the contents of a given line in the text control, not including
any trailing newline character(s).
@returns The contents of the line.
*/
wxString GetLineText(long lineNo) const;
/**
Returns the number of lines in the text control buffer.
@returns The contents of the line.
*/
wxString GetLineText(long lineNo) const;
/**
Returns the number of lines in the text control buffer.
@remarks Note that even empty text controls have one line (where the
insertion point is), so GetNumberOfLines() never
returns 0.
@remarks Note that even empty text controls have one line (where the
insertion point is), so GetNumberOfLines() never
returns 0.
under Windows (at least,) you should use
GetStringSelection() to get the selected
text.
under Windows (at least,) you should use
GetStringSelection() to get the selected
text.
@returns @true on success, @false if an error occurred - it may also mean
that the styles are not supported under this platform.
@returns @true on success, @false if an error occurred - it may also mean
that the styles are not supported under this platform.
@see SetStyle(), wxTextAttr
*/
bool GetStyle(long position, wxTextAttr& style);
@see SetStyle(), wxTextAttr
*/
bool GetStyle(long position, wxTextAttr& style);
@a row parameters (unless the pointers are @NULL which is allowed).
Please note that this function is currently only implemented in wxUniv,
wxMSW and wxGTK2 ports.
@a row parameters (unless the pointers are @NULL which is allowed).
Please note that this function is currently only implemented in wxUniv,
wxMSW and wxGTK2 ports.
@see PositionToXY(), XYToPosition()
*/
wxTextCtrlHitTestResult HitTest(const wxPoint& pt,
@see PositionToXY(), XYToPosition()
*/
wxTextCtrlHitTestResult HitTest(const wxPoint& pt,
Returns @true if the control is currently empty. This is the same as
@c GetValue().empty() but can be much more efficient for the multiline
controls containing big amounts of text.
Returns @true if the control is currently empty. This is the same as
@c GetValue().empty() but can be much more efficient for the multiline
controls containing big amounts of text.
*/
bool IsEmpty() const;
/**
Returns @true if the text has been modified by user. Note that calling
SetValue() doesn't make the control modified.
*/
bool IsEmpty() const;
/**
Returns @true if the text has been modified by user. Note that calling
SetValue() doesn't make the control modified.
@see @ref issingleline() IsMultiLine
*/
bool IsSingleLine() const;
/**
Loads and displays the named file, if it exists.
@see @ref issingleline() IsMultiLine
*/
bool IsSingleLine() const;
/**
Loads and displays the named file, if it exists.
@returns @true if successful, @false otherwise.
*/
bool LoadFile(const wxString& filename,
@returns @true if successful, @false otherwise.
*/
bool LoadFile(const wxString& filename,
/**
This event handler function implements default drag and drop behaviour, which
is to load the first dropped file into the control.
/**
This event handler function implements default drag and drop behaviour, which
is to load the first dropped file into the control.
@returns @true on success, @false on failure (most likely due to a too
large position parameter).
@returns @true on success, @false on failure (most likely due to a too
large position parameter).
/**
Removes the text starting at the first given position up to (but not including)
the character at the last position.
/**
Removes the text starting at the first given position up to (but not including)
the character at the last position.
/**
Replaces the text starting at the first position up to (but not including)
the character at the last position with the given text.
/**
Replaces the text starting at the first position up to (but not including)
the character at the last position with the given text.
@param filename
The name of the file in which to save the text.
@param fileType
The type of file to save. This is currently ignored in wxTextCtrl.
@param filename
The name of the file in which to save the text.
@param fileType
The type of file to save. This is currently ignored in wxTextCtrl.
@returns @true if the operation was successful, @false otherwise.
*/
bool SaveFile(const wxString& filename,
@returns @true if the operation was successful, @false otherwise.
*/
bool SaveFile(const wxString& filename,
However if the @a style parameter is the default wxTextAttr, then the
default style is just reset (instead of being combined with the new style which
wouldn't change it at all).
However if the @a style parameter is the default wxTextAttr, then the
default style is just reset (instead of being combined with the new style which
wouldn't change it at all).
@returns @true on success, @false if an error occurred - may also mean that
the styles are not supported under this platform.
@returns @true on success, @false if an error occurred - may also mean that
the styles are not supported under this platform.
@see GetDefaultStyle()
*/
bool SetDefaultStyle(const wxTextAttr& style);
/**
Makes the text item editable or read-only, overriding the @b wxTE_READONLY flag.
@see GetDefaultStyle()
*/
bool SetDefaultStyle(const wxTextAttr& style);
/**
Makes the text item editable or read-only, overriding the @b wxTE_READONLY flag.
@see MarkDirty(), DiscardEdits()
*/
void SetModified(bool modified);
/**
@see MarkDirty(), DiscardEdits()
*/
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.
+
/**
Changes the style of the given range. If any attribute within @a style is
not set, the corresponding attribute from GetDefaultStyle() is used.
/**
Changes the style of the given range. If any attribute within @a style is
not set, the corresponding attribute from GetDefaultStyle() is used.
@param start
The start of the range to change.
@param end
The end of the range to change.
@param style
The new style for the range.
@param start
The start of the range to change.
@param end
The end of the range to change.
@param style
The new style for the range.
@returns @true on success, @false if an error occurred - it may also mean
that the styles are not supported under this platform.
@returns @true on success, @false if an error occurred - it may also mean
that the styles are not supported under this platform.
@see GetStyle(), wxTextAttr
*/
bool SetStyle(long start, long end, const wxTextAttr& style);
@see GetStyle(), wxTextAttr
*/
bool SetStyle(long start, long end, const wxTextAttr& style);
event.
This function is deprecated and should not be used in new code. Please use the
ChangeValue() function instead.
event.
This function is deprecated and should not be used in new code. Please use the
ChangeValue() function instead.
@remarks Newlines in the text string are the only control characters
allowed, and they will cause appropriate line breaks.
See () and AppendText() for more
@remarks Newlines in the text string are the only control characters
allowed, and they will cause appropriate line breaks.
See () and AppendText() for more
@returns The position value, or -1 if x or y was invalid.
*/
long XYToPosition(long x, long y);
@returns The position value, or -1 if x or y was invalid.
*/
long XYToPosition(long x, long y);
This class can be used to (temporarily) redirect all output sent to a C++
ostream object to a wxTextCtrl instead.
This class can be used to (temporarily) redirect all output sent to a C++
ostream object to a wxTextCtrl instead.
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,
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,
/**
The constructor starts redirecting output sent to @a ostr or @e cout for
the default parameter value to the text control @e text.
/**
The constructor starts redirecting output sent to @a ostr or @e cout for
the default parameter value to the text control @e text.