added possibility to strip only mnemonics, not accels, in wxStripMenuCodes(); added wxControl::GetLabelText()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -31,12 +31,23 @@ Simulates the effect of the user issuing a command to the item. See \helpref{wxC
|
||||
|
||||
\membersection{wxControl::GetLabel}\label{wxcontrolgetlabel}
|
||||
|
||||
\func{wxString\&}{GetLabel}{\void}
|
||||
\constfunc{const wxString\&}{GetLabel}{\void}
|
||||
|
||||
Returns the control's text.
|
||||
|
||||
Note that the returned string contains the mnemonics (\texttt{\&} characters) if
|
||||
any.
|
||||
any, use \helpref{wxControl::GetLabelText}{wxcontrolgetlabeltext} if they are
|
||||
undesired.
|
||||
|
||||
|
||||
\membersection{wxControl::GetLabelText}\label{wxcontrolgetlabeltext}
|
||||
|
||||
\constfunc{const wxString\&}{GetLabelText}{\void}
|
||||
|
||||
\func{static const 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.
|
||||
|
||||
|
||||
\membersection{wxControl::SetLabel}\label{wxcontrolsetlabel}
|
||||
|
@@ -3222,18 +3222,20 @@ See also \helpref{wxGetDisplayName}{wxgetdisplayname}.
|
||||
|
||||
\membersection{::wxStripMenuCodes}\label{wxstripmenucodes}
|
||||
|
||||
\func{wxString}{wxStripMenuCodes}{\param{const wxString\& }{in}}
|
||||
\func{wxString}{wxStripMenuCodes}{\param{const wxString\& }{str}, \param{int }{flags = wxStrip\_All}}
|
||||
|
||||
\func{void}{wxStripMenuCodes}{\param{char *}{in}, \param{char *}{out}}
|
||||
Strips any menu codes from \arg{str} and returns the result.
|
||||
|
||||
{\bf NB:} This function is obsolete, please use
|
||||
\helpref{wxMenuItem::GetLabelFromText}{wxmenuitemgetlabelfromtext} instead.
|
||||
By default, the functions strips both the mnemonics character (\texttt{'\&'})
|
||||
which is used to indicate a keyboard shortkey, and the accelerators, which are
|
||||
used only in the menu items and are separated from the main text by the
|
||||
\texttt{$\backslash$t} (TAB) character. By using \arg{flags} of
|
||||
\texttt{wxStrip\_Mnemonics} or \texttt{wxStrip\_Accel} to strip only the former
|
||||
or the latter part, respectively.
|
||||
|
||||
Strips any menu codes from {\it in} and places the result
|
||||
in {\it out} (or returns the new string, in the first form).
|
||||
|
||||
Menu codes include \& (mark the next character with an underline
|
||||
as a keyboard shortkey in Windows and Motif) and $\backslash$t (tab in Windows).
|
||||
Notice that in most cases
|
||||
\helpref{wxMenuItem::GetLabelFromText}{wxmenuitemgetlabelfromtext} or
|
||||
\helpref{wxControl::GetLabelText}{wxcontrolgetlabeltext} can be used instead.
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
|
Reference in New Issue
Block a user