wxtogglebuttonwxtogglebutton is a button that stays pressed when clicked by the user. in other words, it is similar to wxcheckbox in functionality but looks like a wxbutton. you can see wxtogglebutton in action in the sixth page of the controls sample. derived from
wxcontrol include files <wx/tglbtn.h> window styles there are no special styles for wxtogglebutton. see also window styles overview. event handling
see also members
wxtogglebutton::wxtogglebutton
wxtogglebutton::wxtogglebuttonwxtogglebutton() default constructor. wxtogglebutton(wxwindow* parent, wxwindowid id, const wxstring& label, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = 0, const wxvalidator& val, const wxstring& name = "checkbox") constructor, creating and showing a toggle button. parameters parent
id
label
pos
size
style
validator
name
see also wxtogglebutton::create, wxvalidator
wxtogglebutton::~wxtogglebutton~wxtogglebutton() destructor, destroying the toggle button.
wxtogglebutton::createbool create(wxwindow* parent, wxwindowid id, const wxstring& label, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = 0, const wxvalidator& val, const wxstring& name = "checkbox") creates the toggle button for two-step construction. see wxtogglebutton::wxtogglebutton for details.
wxtogglebutton::getvaluebool getvalue() const gets the state of the toggle button. return value returns true if it is pressed, false otherwise.
wxtogglebutton::setvaluevoid setvalue(const bool state) sets the toggle button to the given state. this does not cause a evt_togglebutton event to be emitted. parameters state
|