X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..6d4737120776b48a1bb4e8e5575329e213a50810:/src/msw/checkbox.cpp diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index 316735594c..681c4e5a10 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -6,7 +6,7 @@ // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -91,11 +91,11 @@ wxEND_FLAGS( wxCheckBoxStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxCheckBox, wxControl,"wx/checkbox.h") wxBEGIN_PROPERTIES_TABLE(wxCheckBox) - wxEVENT_PROPERTY( Click , wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEvent ) + wxEVENT_PROPERTY( Click , wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEvent ) - 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, EMPTY_MACROVALUE, 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, EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY_FLAGS( WindowStyle , wxCheckBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() @@ -159,16 +159,12 @@ bool wxCheckBox::Create(wxWindow *parent, if ( style & wxALIGN_RIGHT ) { - msStyle |= BS_LEFTTEXT; + msStyle |= BS_LEFTTEXT | BS_RIGHT; } return MSWCreateControl(wxT("BUTTON"), msStyle, pos, size, label, 0); } -void wxCheckBox::SetLabel(const wxString& label) -{ - SetWindowText(GetHwnd(), label); -} wxSize wxCheckBox::DoGetBestSize() const { @@ -198,6 +194,9 @@ wxSize wxCheckBox::DoGetBestSize() const wCheckbox = s_checkSize; hCheckbox = s_checkSize; } +#ifdef __WXWINCE__ + hCheckbox += 1; +#endif return wxSize(wCheckbox, hCheckbox); }