// macros
// ----------------------------------------------------------------------------
- IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl)
- IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox)
+IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl)
+IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox)
// ============================================================================
// implementation
}
// Single check box item
-bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
- const wxPoint& pos,
- const wxSize& size, long style,
- const wxValidator& validator,
- const wxString& name)
+bool wxCheckBox::Create(wxWindow *parent,
+ wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos,
+ const wxSize& size, long style,
+ const wxValidator& validator,
+ const wxString& name)
{
SetName(name);
+#if wxUSE_VALIDATORS
SetValidator(validator);
+#endif // wxUSE_VALIDATORS
if (parent) parent->AddChild(this);
SetBackgroundColour(parent->GetBackgroundColour()) ;
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,
const wxString& name)
{
SetName(name);
+#if wxUSE_VALIDATORS
SetValidator(validator);
+#endif // wxUSE_VALIDATORS
if (parent) parent->AddChild(this);
SetBackgroundColour(parent->GetBackgroundColour()) ;