1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxControl
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
12 This is the base class for a control or "widget".
14 A control is generally a small window which processes user input and/or
15 displays one or more item of data.
22 class wxControl
: public wxWindow
26 Simulates the effect of the user issuing a command to the item.
30 virtual void Command(wxCommandEvent
& event
);
33 Returns the control's text.
35 @note The returned string contains mnemonics ("&" characters) if it has
36 any, use GetLabelText() if they are undesired.
38 wxString
GetLabel() const;
41 Returns the control's label without mnemonics.
43 wxString
GetLabelText() const;
46 Returns the given @a label string without mnemonics ("&" characters).
48 static wxString
GetLabelText(const wxString
& label
);
51 Removes the mnemonics ("&" characters) from the given string.
53 static wxString
RemoveMnemonics(const wxString
& str
);
58 Any "&" characters in the @a label are special and indicate that the
59 following character is a @e mnemonic for this control and can be used to
60 activate it from the keyboard (typically by using @e Alt key in
62 To insert a literal ampersand character, you need to double it, i.e. use "&&".
64 void SetLabel(const wxString
& label
);