]> git.saurik.com Git - wxWidgets.git/blobdiff - src/palmos/tglbtn.cpp
define WM_CONTEXTMENU if the standard headers don't
[wxWidgets.git] / src / palmos / tglbtn.cpp
index e4b49b65ab743b10e694c580bbed7b987fa1be35..7412efaf5c60a461b21e5fff87c956c24ef03408 100644 (file)
@@ -60,8 +60,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 +86,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)
 {
 }