X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1ecc4d808e6100aefda0f4097beeefeeab475ddd..4d19d979165dfab92cccd656b9f75c2d516aa21b:/src/gtk1/statbox.cpp diff --git a/src/gtk1/statbox.cpp b/src/gtk1/statbox.cpp index a41325fb08..84fd9673ff 100644 --- a/src/gtk1/statbox.cpp +++ b/src/gtk1/statbox.cpp @@ -13,6 +13,11 @@ #include "wx/statbox.h" +#if wxUSE_STATBOX + +#include "gdk/gdk.h" +#include "gtk/gtk.h" + //----------------------------------------------------------------------------- // wxStaticBox //----------------------------------------------------------------------------- @@ -40,11 +45,9 @@ bool wxStaticBox::Create( wxWindow *parent, wxWindowID id, const wxString &label m_isStaticBox = TRUE; - m_widget = gtk_frame_new(m_label); + m_widget = gtk_frame_new(m_label.mbc_str()); - m_parent->AddChild( this ); - - (m_parent->m_insertCallback)( m_parent, this ); + m_parent->DoAddChild( this ); PostCreation(); @@ -52,6 +55,7 @@ bool wxStaticBox::Create( wxWindow *parent, wxWindowID id, const wxString &label SetBackgroundColour( parent->GetBackgroundColour() ); SetForegroundColour( parent->GetForegroundColour() ); + SetFont( parent->GetFont() ); Show( TRUE ); @@ -62,7 +66,7 @@ void wxStaticBox::SetLabel( const wxString &label ) { wxControl::SetLabel( label ); GtkFrame *frame = GTK_FRAME( m_widget ); - gtk_frame_set_label( frame, GetLabel() ); + gtk_frame_set_label( frame, GetLabel().mbc_str() ); } void wxStaticBox::ApplyWidgetStyle() @@ -71,3 +75,4 @@ void wxStaticBox::ApplyWidgetStyle() gtk_widget_set_style( m_widget, m_widgetStyle ); } +#endif