+//-----------------------------------------------------------------------------
+// wxBitmapToggleButton
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxBitmapToggleButton, wxToggleButton)
+
+bool wxBitmapToggleButton::Create( wxWindow *parent, wxWindowID id,
+ const wxBitmap& label,const wxPoint& pos, const wxSize& size, long style,
+ const wxValidator& validator, const wxString& name )
+{
+ if (!wxToggleButton::Create( parent, id, wxEmptyString, pos, size, style, validator, name ))
+ return false;
+
+ SetBitmap(label);
+
+ if (size.x == -1 || size.y == -1)
+ {
+ wxSize new_size = GetBestSize();
+ if (size.x != -1)
+ new_size.x = size.x;
+ if (size.y != -1)
+ new_size.y = size.y;
+ SetSize( new_size );
+ }
+
+ return true;
+}
+
+