]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/control.h
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.
48 static wxString
GetLabelText(const wxString
& label
);
53 Any "&" characters in the @a label are special and indicate that the
54 following character is a mnemonic for this control and can be used to
55 activate it from the keyboard (typically by using @e Alt key in
56 combination with it). To insert a literal ampersand character, you need
57 to double it, i.e. use "&&".
59 void SetLabel(const wxString
& label
);