Contents Up Previous Next

wxControl

This is the base class for a control or "widget''.

A control is generally a small window which processes user input and/or displays one or more item of data.

Derived from

wxWindow
wxEvtHandler
wxObject

Include files

<wx/control.h>

See also

wxValidator

Members

wxControl::Command
wxControl::GetLabel
wxControl::SetLabel


wxControl::Command

void Command(wxCommandEvent& event)

Simulates the effect of the user issuing a command to the item. See wxCommandEvent.


wxControl::GetLabel

wxString& GetLabel()

Returns the control's text.

Note that the returned string contains the mnemonics (& characters) if any.


wxControl::SetLabel

void SetLabel(const wxString& label)

Sets the item's text.

The & characters in the label are special and indicate that the following character is a mnemonic for this control and can be used to activate it from the keyboard (typically by using Alt key in combination with it). To insert a literal ampersand character, you need to double it, i.e. use "&&".