X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23645bfa01b6450257f140a30c87565225b1ef4a..174911cfd60f5cde1f1ebc78df0a8b8ff648a197:/src/univ/checkbox.cpp diff --git a/src/univ/checkbox.cpp b/src/univ/checkbox.cpp index 295756acd0..c15ebca4ba 100644 --- a/src/univ/checkbox.cpp +++ b/src/univ/checkbox.cpp @@ -70,6 +70,8 @@ bool wxCheckBox::Create(wxWindow *parent, if ( !wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name) ) return FALSE; + m_hasDialogBackground = TRUE; + SetLabel(label); SetBestSize(size); @@ -154,10 +156,12 @@ void wxCheckBox::DoDraw(wxControlRenderer *renderer) if ( m_status == Status_Checked ) flags |= wxCONTROL_CHECKED; + wxBitmap bitmap(GetBitmap(GetState(flags), m_status)); + renderer->GetRenderer()-> DrawCheckButton(dc, GetLabel(), - GetBitmap(GetState(flags), m_status), + bitmap, renderer->GetRect(), flags, GetWindowStyle() & wxALIGN_RIGHT ? wxALIGN_RIGHT