- if (!PreCreation( parent, pos, size ) ||
- !wxControl::CreateBase(parent, id, pos, size, style, validator, name))
- {
- wxFAIL_MSG( wxT("wxColourButton creation failed") );
- return false;
- }
+ m_colour = col;
+#ifdef __WXGTK3__
+ m_widget = gtk_color_button_new_with_rgba(m_colour);
+#else
+ m_widget = gtk_color_button_new_with_color( m_colour.GetColor() );
+#endif
+ g_object_ref(m_widget);