+#if GTK_CHECK_VERSION(2,4,0)
+ gtk_button_set_alignment(GTK_BUTTON(m_widget), x_alignment, y_alignment);
+#else
+ if (GTK_IS_MISC(BUTTON_CHILD(m_widget)))
+ gtk_misc_set_alignment (GTK_MISC (BUTTON_CHILD (m_widget)),
+ x_alignment, y_alignment);
+#endif
+
+ if (!label.empty())
+ SetLabel(label);
+
+ if (style & wxNO_BORDER)
+ gtk_button_set_relief( GTK_BUTTON(m_widget), GTK_RELIEF_NONE );
+
+ gtk_signal_connect( GTK_OBJECT(m_widget), "clicked",
+ GTK_SIGNAL_FUNC(gtk_button_clicked_callback), (gpointer*)this );
+
+ m_parent->DoAddChild( this );
+
+ PostCreation(size);
+
+ return true;
+}
+
+bool wxButton::Create(wxWindow *parent, wxWindowID id, wxStockItemID stock,
+ const wxString& descriptiveLabel,
+ const wxPoint& pos, long style,
+ const wxValidator& validator, const wxString& name)
+{
+#ifdef __WXGTK20__
+ const char *gtkstock = wxStockItemToGTK(stock);
+ if (gtkstock)
+ {
+ m_widget = gtk_button_new_from_stock(gtkstock);
+ return Create(parent, id, wxEmptyString,
+ pos, wxDefaultSize, style, validator, name);
+ }
+ else
+ {
+ // not supported by this GTK+ version
+ return Create(parent, id, wxGetStockItemLabel(stock),
+ pos, wxDefaultSize, style, validator, name);
+ }
+#else
+ return CreateStock(parent, id, stock, descriptiveLabel,
+ pos, style, validator, name);
+#endif
+}