wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
-
+
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxBEGIN_HANDLERS_TABLE(wxRadioButton)
wxEND_HANDLERS_TABLE()
-wxCONSTRUCTOR_6( wxRadioButton , wxWindow* , Parent , wxWindowID , Id , wxString , Label , wxPoint , Position , wxSize , Size , long , WindowStyle )
+wxCONSTRUCTOR_6( wxRadioButton , wxWindow* , Parent , wxWindowID , Id , wxString , Label , wxPoint , Position , wxSize , Size , long , WindowStyle )
#else
IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
if ( HasFlag(wxCLIP_SIBLINGS) )
msStyle |= WS_CLIPSIBLINGS;
+ if ( HasFlag(wxALIGN_RIGHT) )
+ msStyle |= BS_LEFTTEXT | BS_RIGHT;
if ( !MSWCreateControl(_T("BUTTON"), msStyle, pos, size, label, 0) )
return false;
{
wxRadioButton *btn = wxDynamicCast(nodeBefore->GetData(),
wxRadioButton);
- if ( !btn )
+ if ( btn && btn->HasFlag(wxRB_SINGLE) )
{
- // the radio buttons in a group must be consecutive, so
- // there are no more of them
+ // A wxRB_SINGLE button isn't part of this group
break;
}
-
- btn->SetValue(false);
-
- if ( btn->HasFlag(wxRB_GROUP) )
+
+ if (btn)
{
- // even if there are other radio buttons before this one,
- // they're not in the same group with us
- break;
+ btn->SetValue(false);
+
+ if ( btn->HasFlag(wxRB_GROUP) )
+ {
+ // even if there are other radio buttons before this one,
+ // they're not in the same group with us
+ break;
+ }
}
}
}
wxRadioButton *btn = wxDynamicCast(nodeAfter->GetData(),
wxRadioButton);
- if ( !btn || btn->HasFlag(wxRB_GROUP) )
+ if ( btn && (btn->HasFlag(wxRB_GROUP) || btn->HasFlag(wxRB_SINGLE) ) )
{
// no more buttons or the first button of the next group
break;
}
- btn->SetValue(false);
+ if (btn)
+ btn->SetValue(false);
}
}
}