]> git.saurik.com Git - wxWidgets.git/blobdiff - src/palmos/radiobut.cpp
added wxWS_EX_VALIDATE_RECURSIVELY
[wxWidgets.git] / src / palmos / radiobut.cpp
index fe3a1845ee0c920b797aa84f0d7b4ba9f7c8fcdb..2e008218e0a8158321d134bda60f11fba6054742 100644 (file)
@@ -103,6 +103,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
 void wxRadioButton::Init()
 {
     m_radioStyle = pushButtonCtl;
+    m_groupID = 0;
 }
 
 bool wxRadioButton::Create(wxWindow *parent,
@@ -114,6 +115,10 @@ bool wxRadioButton::Create(wxWindow *parent,
                            const wxValidator& validator,
                            const wxString& name)
 {
+    // replace native push button with native checkbox
+    if ( style & wxRB_USE_CHECKBOX )
+        m_radioStyle = checkboxCtl;
+
     if(!wxControl::Create(parent, id, pos, size, style, validator, name))
         return false;
 
@@ -122,10 +127,16 @@ bool wxRadioButton::Create(wxWindow *parent,
                           m_radioStyle == checkboxCtl ? checkboxCtl : pushButtonCtl,
                           label,
                           pos,
-                          size
+                          size,
+                          m_groupID
                       );
 }
 
+void wxRadioButton::SetGroup(uint8_t group)
+{
+    m_groupID = group;
+}
+
 // ----------------------------------------------------------------------------
 // wxRadioButton functions
 // ----------------------------------------------------------------------------