// wxRadioButton
//-----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxRadioButton,wxControl)
-
bool wxRadioButton::Create( wxWindow *parent,
wxWindowID id,
const wxString& label,
{
wxCHECK_RET( m_widget != NULL, wxT("invalid radiobutton") );
+ // save the original label
+ wxControlBase::SetLabel(label);
+
GTKSetLabelForLabel(GTK_LABEL(GTK_BIN(m_widget)->child), label);
}
bool wxRadioButton::Enable( bool enable )
{
- bool isEnabled = IsEnabled();
-
- if ( !wxControl::Enable( enable ) )
+ if (!base_type::Enable(enable))
return false;
gtk_widget_set_sensitive(GTK_BIN(m_widget)->child, enable);
- if (!isEnabled && enable)
- {
+ if (enable)
GTKFixSensitivity();
- }
return true;
}