m_windowStyle = style;
+ // VZ: disabling this ugliness which completely breaks checkboxes in wxGrid
+ // whoever did it, please tell me where and how does the checkbox fail
+ // to appear
+#if 0
wxString Label = label;
if (Label == wxT(""))
Label = wxT(" "); // Apparently needed or checkbox won't show
+#endif // 0
if ( id == -1 )
m_windowId = NewControlId();
msStyle |= WS_BORDER;
*/
- m_hWnd = (WXHWND)CreateWindowEx(exStyle, wxT("BUTTON"), Label,
+ m_hWnd = (WXHWND)CreateWindowEx(exStyle, wxT("BUTTON"), label,
msStyle,
0, 0, 0, 0,
(HWND)parent->GetHWND(), (HMENU)m_windowId,
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);