diff --git a/src/gtk/statbox.cpp b/src/gtk/statbox.cpp index 22c946136c..3884e299b7 100644 --- a/src/gtk/statbox.cpp +++ b/src/gtk/statbox.cpp @@ -58,14 +58,14 @@ bool wxStaticBox::Create( wxWindow *parent, return FALSE; } - m_widget = gtk_frame_new(label.empty() ? (char *)NULL : label.mbc_str()); + wxControl::SetLabel(label); + + m_widget = gtk_frame_new(m_label.empty() ? (char *)NULL : m_label.mbc_str()); m_parent->DoAddChild( this ); PostCreation(); - SetLabel(label); - InheritAttributes(); // need to set non default alignment? @@ -90,7 +90,7 @@ void wxStaticBox::SetLabel( const wxString &label ) wxControl::SetLabel( label ); gtk_frame_set_label( GTK_FRAME( m_widget ), - label.empty() ? (char *)NULL : label.mbc_str() ); + m_label.empty() ? (char *)NULL : m_label.mbc_str() ); } void wxStaticBox::ApplyWidgetStyle() diff --git a/src/gtk1/statbox.cpp b/src/gtk1/statbox.cpp index 22c946136c..3884e299b7 100644 --- a/src/gtk1/statbox.cpp +++ b/src/gtk1/statbox.cpp @@ -58,14 +58,14 @@ bool wxStaticBox::Create( wxWindow *parent, return FALSE; } - m_widget = gtk_frame_new(label.empty() ? (char *)NULL : label.mbc_str()); + wxControl::SetLabel(label); + + m_widget = gtk_frame_new(m_label.empty() ? (char *)NULL : m_label.mbc_str()); m_parent->DoAddChild( this ); PostCreation(); - SetLabel(label); - InheritAttributes(); // need to set non default alignment? @@ -90,7 +90,7 @@ void wxStaticBox::SetLabel( const wxString &label ) wxControl::SetLabel( label ); gtk_frame_set_label( GTK_FRAME( m_widget ), - label.empty() ? (char *)NULL : label.mbc_str() ); + m_label.empty() ? (char *)NULL : m_label.mbc_str() ); } void wxStaticBox::ApplyWidgetStyle()