\membersection{wxControl::GetLabel}\label{wxcontrolgetlabel}
-\constfunc{const wxString\&}{GetLabel}{\void}
+\constfunc{wxString}{GetLabel}{\void}
Returns the control's text.
\constfunc{const wxString\&}{GetLabelText}{\void}
-\func{static const wxString\&}{GetLabelText}{\param{const wxString\& }{label}}
+\func{static wxString}{GetLabelText}{\param{const wxString\& }{label}}
-Returns the control's label or the given \arg{label} string for the static
-version without the mnemonics characters.
+Returns the control's label, or the given \arg{label} string for the static
+version, without the mnemonics characters.
\membersection{wxControl::SetLabel}\label{wxcontrolsetlabel}
\membersection{wxStaticText::GetLabelText}\label{wxstatictextgetlabeltext}
-\constfunc{const wxString\&}{GetLabelText}{\void}
+\constfunc{wxString}{GetLabelText}{\void}
-Returns the control's label or the given \arg{label} string for the static
-version without the mnemonics characters (if any) and without the markup
-(if the control has \texttt{wxST\_MARKUP} style).
+\func{static wxString}{GetLabelText}{\param{const wxString\& }{label}}
+The first form returns the control's label without the mnemonics characters (if any)
+and without the markup (if the control has \texttt{wxST\_MARKUP} style).
+
+The second (static) version returns the given \arg{label} string without the mnemonics
+characters (if any) and without the markup.
\membersection{wxStaticText::SetLabel}\label{wxstatictextsetlabel}
// public utilities (symmetric to those in wxControl about mnemonics):
+ // get the string without mnemonic characters ('&') and without markup
+ static wxString GetLabelText(const wxString& label);
+
// removes the markup accepted by wxStaticText when wxST_MARKUP is used,
// and then returns the cleaned string
static wxString RemoveMarkup(const wxString& str);
return RemoveMnemonics(ret);
}
+/*static*/
+wxString wxStaticTextBase::GetLabelText(const wxString& label)
+{
+ // remove markup
+ wxString ret = RemoveMarkup(label);
+ return RemoveMnemonics(ret);
+}
+
/*static*/
wxString wxStaticTextBase::RemoveMarkup(const wxString& text)
{