// wxCheckBox
//-----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxCheckBox,wxControl)
-
wxCheckBox::wxCheckBox()
{
}
const wxValidator& validator,
const wxString &name )
{
+ WXValidateStyle( &style );
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
return false;
}
- wxASSERT_MSG( (style & wxCHK_ALLOW_3RD_STATE_FOR_USER) == 0 ||
- (style & wxCHK_3STATE) != 0,
- wxT("Using wxCHK_ALLOW_3RD_STATE_FOR_USER")
- wxT(" style flag for a 2-state checkbox is useless") );
-
if ( style & wxALIGN_RIGHT )
{
// VZ: as I don't know a way to create a right aligned checkbox with
bool wxCheckBox::Enable( bool enable )
{
- bool isEnabled = IsEnabled();
-
- if ( !wxControl::Enable( enable ) )
+ if (!base_type::Enable(enable))
return false;
gtk_widget_set_sensitive( m_widgetLabel, enable );
- if (!isEnabled && enable)
- {
+ if (enable)
GTKFixSensitivity();
- }
return true;
}
return GTK_BUTTON(m_widgetCheckbox)->event_window;
}
-wxSize wxCheckBox::DoGetBestSize() const
-{
- return wxControl::DoGetBestSize();
-}
-
// static
wxVisualAttributes
wxCheckBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))