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::GetLabelText
wxControl::SetLabel


wxControl::Command

void Command(wxCommandEvent& event)

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


wxControl::GetLabel

const wxString& GetLabel() const

Returns the control's text.

Note that the returned string contains the mnemonics (& characters) if any, use wxControl::GetLabelText if they are undesired.


wxControl::GetLabelText

const wxString& GetLabelText() const

static const wxString& GetLabelText(const wxString& label)

Returns the control's label or the given label string for the static version without the mnemonics characters.


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 "&&".