]>
Commit | Line | Data |
---|---|---|
a660d684 KB |
1 | \section{\class{wxControl}}\label{wxcontrol} |
2 | ||
1b69c815 | 3 | This is the base class for a control or ``widget''. |
a660d684 | 4 | |
1b69c815 VZ |
5 | A control is generally a small window which processes user input and/or |
6 | displays one or more item of data. | |
a660d684 KB |
7 | |
8 | \wxheading{Derived from} | |
9 | ||
10 | \helpref{wxWindow}{wxwindow}\\ | |
11 | \helpref{wxEvtHandler}{wxevthandler}\\ | |
12 | \helpref{wxObject}{wxobject} | |
13 | ||
954b8ae6 JS |
14 | \wxheading{Include files} |
15 | ||
16 | <wx/control.h> | |
17 | ||
a660d684 KB |
18 | \wxheading{See also} |
19 | ||
20 | \helpref{wxValidator}{wxvalidator} | |
21 | ||
22 | \latexignore{\rtfignore{\wxheading{Members}}} | |
23 | ||
1b69c815 | 24 | |
a660d684 KB |
25 | \membersection{wxControl::Command}\label{wxcontrolcommand} |
26 | ||
27 | \func{void}{Command}{\param{wxCommandEvent\& }{event}} | |
28 | ||
29 | Simulates the effect of the user issuing a command to the item. See \helpref{wxCommandEvent}{wxcommandevent}. | |
30 | ||
1b69c815 | 31 | |
a660d684 KB |
32 | \membersection{wxControl::GetLabel}\label{wxcontrolgetlabel} |
33 | ||
74639764 | 34 | \constfunc{const wxString\&}{GetLabel}{\void} |
a660d684 KB |
35 | |
36 | Returns the control's text. | |
37 | ||
f107837e | 38 | Note that the returned string contains the mnemonics (\texttt{\&} characters) if |
74639764 VZ |
39 | any, use \helpref{wxControl::GetLabelText}{wxcontrolgetlabeltext} if they are |
40 | undesired. | |
41 | ||
42 | ||
43 | \membersection{wxControl::GetLabelText}\label{wxcontrolgetlabeltext} | |
44 | ||
45 | \constfunc{const wxString\&}{GetLabelText}{\void} | |
46 | ||
47 | \func{static const wxString\&}{GetLabelText}{\param{const wxString\& }{label}} | |
48 | ||
49 | Returns the control's label or the given \arg{label} string for the static | |
50 | version without the mnemonics characters. | |
f107837e | 51 | |
1b69c815 | 52 | |
a660d684 KB |
53 | \membersection{wxControl::SetLabel}\label{wxcontrolsetlabel} |
54 | ||
55 | \func{void}{SetLabel}{\param{const wxString\& }{label}} | |
56 | ||
57 | Sets the item's text. | |
58 | ||
f107837e VZ |
59 | The \texttt{\&} characters in the \arg{label} are special and indicate that the |
60 | following character is a mnemonic for this control and can be used to activate | |
61 | it from the keyboard (typically by using \textit{Alt} key in combination with | |
62 | it). To insert a literal ampersand character, you need to double it, i.e. use | |
63 | \texttt{"\&\&"}. | |
64 | ||
65 |