X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ba88951339bb5ae38d11394b25041b7e019b6883..f20e3df6d3a2c69d2941dddd4e815d4ceea29abe:/src/palmos/tglbtn.cpp diff --git a/src/palmos/tglbtn.cpp b/src/palmos/tglbtn.cpp index e4b49b65ab..d9de36c03f 100644 --- a/src/palmos/tglbtn.cpp +++ b/src/palmos/tglbtn.cpp @@ -37,6 +37,8 @@ #include "wx/tglbtn.h" +#include + // ---------------------------------------------------------------------------- // macros // ---------------------------------------------------------------------------- @@ -60,8 +62,10 @@ bool wxToggleButton::Create(wxWindow *parent, wxWindowID id, const wxValidator& validator, const wxString& name) { - wxControl::PalmCreateControl(pushButtonCtl, parent, id, label, pos, size); - return true; + if(!wxControl::Create(parent, id, pos, size, style, validator, name)) + return false; + + return wxControl::PalmCreateControl(pushButtonCtl, label, pos, size); } wxBorder wxToggleButton::GetDefaultBorder() const @@ -84,6 +88,14 @@ bool wxToggleButton::GetValue() const return GetBoolValue(); } +bool wxToggleButton::SendClickEvent() +{ + wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, GetId()); + event.SetInt(GetValue()); + event.SetEventObject(this); + return ProcessCommand(event); +} + void wxToggleButton::Command(wxCommandEvent & event) { }