diff --git a/docs/latex/wx/text.tex b/docs/latex/wx/text.tex index 7c576bb75b..1e7459ff47 100644 --- a/docs/latex/wx/text.tex +++ b/docs/latex/wx/text.tex @@ -567,6 +567,28 @@ read-only mode by a previous call to Returns {\tt TRUE} if the text has been modified by user. Note that calling \helpref{SetValue}{wxtextctrlsetvalue} doesn't make the control modified. +\membersection{wxTextCtrl::IsMultiLine}\label{wxtextctrlismultiline} + +\constfunc{bool}{IsMultiLine}{\void} + +Returns {\tt TRUE} if this is a multi line edit control and {\tt FALSE} +otherwise. + +\wxheading{See also} + +\helpref{IsSingleLine}{wxtextctrlissingleline} + +\membersection{wxTextCtrl::IsSingleLine}\label{wxtextctrlissingleline} + +\constfunc{bool}{IsSingleLine}{\void} + +Returns {\tt TRUE} if this is a single line edit control and {\tt FALSE} +otherwise. + +\wxheading{See also} + +\helpref{IsMultiLine}{wxtextctrlissingleline} + \membersection{wxTextCtrl::LoadFile}\label{wxtextctrlloadfile} \func{bool}{LoadFile}{\param{const wxString\& }{ filename}} diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h index f3a0c2a0bd..56646fa242 100644 --- a/include/wx/textctrl.h +++ b/include/wx/textctrl.h @@ -174,6 +174,10 @@ public: virtual bool IsModified() const = 0; virtual bool IsEditable() const = 0; + // more readable flag testing methods + bool IsSingleLine() const { return !(GetWindowStyle() & wxTE_MULTILINE); } + bool IsMultiLine() const { return !IsSingleLine(); } + // If the return values from and to are the same, there is no selection. virtual void GetSelection(long* from, long* to) const = 0;