SetWindowText(GetHwnd(), label);
}
+#define CHECK_SIZE 13
+
wxSize wxCheckBox::DoGetBestSize() const
{
int wCheckbox, hCheckbox;
- wxString str = wxGetWindowText(GetHWND());
+ wxString str = wxGetWindowText(GetHWND()) + " ";
if ( !str.IsEmpty() )
{
GetTextExtent(str, &wCheckbox, &hCheckbox);
- wCheckbox += RADIO_SIZE;
+ wCheckbox += CHECK_SIZE;
- if ( hCheckbox < RADIO_SIZE )
- hCheckbox = RADIO_SIZE;
+ if ( hCheckbox < CHECK_SIZE )
+ hCheckbox = CHECK_SIZE;
}
else
{
- wCheckbox = RADIO_SIZE;
- hCheckbox = RADIO_SIZE;
+ wCheckbox = CHECK_SIZE;
+ hCheckbox = CHECK_SIZE;
}
return wxSize(wCheckbox, hCheckbox);