// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "button.h"
#endif
+#include "wx/defs.h"
+
+#if wxUSE_BUTTON
+
#include "wx/button.h"
#include <gdk/gdk.h>
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( wxT("wxButton creation failed") );
- return FALSE;
+ return FALSE;
}
/*
for (size_t i = 0; i < label2.Len(); i++)
{
if (label2.GetChar(i) == wxT('&'))
- label2.SetChar(i,wxT('_'));
+ label2.SetChar(i,wxT('_'));
}
GtkWidget *accel_label = gtk_accel_label_new( label2.mb_str() );
PostCreation();
- ApplyWidgetStyle();
-
SetFont( parent->GetFont() );
wxSize best_size( DoGetBestSize() );
wxSize wxButton::DoGetBestSize() const
{
wxSize ret( wxControl::DoGetBestSize() );
- if (ret.x < 80) ret.x = 80;
+
+ if (!HasFlag(wxBU_EXACTFIT))
+ {
+ if (ret.x < 80) ret.x = 80;
+ }
+
return ret;
}
+#endif // wxUSE_BUTTON
+