+ GtkJustification justify;
+ if ( style & wxALIGN_CENTER )
+ justify = GTK_JUSTIFY_CENTER;
+ else if ( style & wxALIGN_RIGHT )
+ justify = GTK_JUSTIFY_RIGHT;
+ else // wxALIGN_LEFT is 0
+ justify = GTK_JUSTIFY_LEFT;
+ gtk_label_set_justify(GTK_LABEL(m_widget), justify);
+
+ // GTK_JUSTIFY_LEFT is 0, RIGHT 1 and CENTER 2
+ static const float labelAlignments[] = { 0.0, 1.0, 0.5 };
+ gtk_misc_set_alignment(GTK_MISC(m_widget), labelAlignments[justify], 0.0);
+
+ // do not move this call elsewhere
+ gtk_label_set_line_wrap( GTK_LABEL(m_widget), FALSE );
+
+ m_parent->DoAddChild( this );
+
+ PostCreation();
+
+ ApplyWidgetStyle();
+
+ wxControl::SetFont( parent->GetFont() );
+
+ wxSize size_best( DoGetBestSize() );
+ wxSize new_size( size );
+ if (new_size.x == -1)
+ new_size.x = size_best.x;
+ if (new_size.y == -1)
+ new_size.y = size_best.y;
+ if ((new_size.x != size.x) || (new_size.y != size.y))
+ SetSize( new_size.x, new_size.y );
+
+ SetBackgroundColour( parent->GetBackgroundColour() );
+ SetForegroundColour( parent->GetForegroundColour() );
+ Show( TRUE );
+
+ return TRUE;