// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "checkbox.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/settings.h"
#endif
+#include <Control.h>
+
// ============================================================================
// implementation
// ============================================================================
const wxValidator& validator,
const wxString& name)
{
- wxControl::PalmCreateControl(checkboxCtl, parent, id, label, pos, size);
- return true;
+ if(!wxControl::Create(parent, id, pos, size, style, validator, name))
+ return false;
+
+ return wxControl::PalmCreateControl(checkboxCtl, label, pos, size);
}
wxSize wxCheckBox::DoGetBestSize() const
void wxCheckBox::SetValue(bool val)
{
+ SetBoolValue(val);
}
bool wxCheckBox::GetValue() const
{
- return false;
+ return GetBoolValue();
+}
+
+bool wxCheckBox::SendClickEvent()
+{
+ wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, GetId());
+ event.SetInt(GetValue());
+ event.SetEventObject(this);
+ return ProcessCommand(event);
}
void wxCheckBox::Command(wxCommandEvent& event)