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