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
|