wxBEGIN_PROPERTIES_TABLE(wxRadioButton)
wxEVENT_PROPERTY( Click , wxEVT_COMMAND_RADIOBUTTON_SELECTED , wxCommandEvent )
- wxPROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
+ wxPROPERTY( Font , wxFont , SetFont , GetFont , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxString(), 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
- wxPROPERTY( Value ,bool, SetValue, GetValue,, 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
- wxPROPERTY_FLAGS( WindowStyle , wxRadioButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
+ wxPROPERTY( Value ,bool, SetValue, GetValue, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
+ wxPROPERTY_FLAGS( WindowStyle , wxRadioButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxBEGIN_HANDLERS_TABLE(wxRadioButton)
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;
void wxRadioButton::SetValue(bool value)
{
- // BST_CHECKED is defined as 1, BST_UNCHECKED as 0, so we can just pass
- // value as is (we don't use BST_XXX here as they're not defined for Win16)
- (void)::SendMessage(GetHwnd(), BM_SETCHECK, (WPARAM)value, 0L);
+ (void)::SendMessage(GetHwnd(), BM_SETCHECK, (value?BST_CHECKED:BST_UNCHECKED), 0L);
m_isChecked = value;