-
- SetCanAddEventHandler(TRUE);
- AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
-
- ChangeBackgroundColour();
-
- return TRUE;
+
+ PostCreation();
+ AttachWidget (parent, m_mainWidget, (WXWidget) NULL,
+ pos.x, pos.y, size.x, size.y);
+
+ //copied from mac/radiobut.cpp (from here till "return true;")
+ m_cycle = this ;
+
+ if (HasFlag(wxRB_GROUP))
+ {
+ AddInCycle( NULL ) ;
+ }
+ else
+ {
+ /* search backward for last group start */
+ wxRadioButton *chief = NULL;
+ wxWindowList::compatibility_iterator node = parent->GetChildren().GetLast();
+ while (node)
+ {
+ wxWindow *child = node->GetData();
+ if (child->IsKindOf( CLASSINFO( wxRadioButton ) ) )
+ {
+ chief = (wxRadioButton*) child;
+ if (child->HasFlag(wxRB_GROUP)) break;
+ }
+ node = node->GetPrevious();
+ }
+ AddInCycle( chief ) ;
+ }
+ return true;