X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c67d86184d21b37d32c621bd45318d5818c3f864..f5e27805de786dbb3976782ba2a3365c27256031:/src/gtk/textctrl.cpp diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index ebd439de82..d7e77bbc56 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -119,6 +119,10 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value, if (newSize.y == -1) newSize.y = 26; SetSize( newSize.x, newSize.y ); + m_parent->AddChild( this ); + + (m_parent->m_insertCallback)( m_parent, this ); + PostCreation(); if (bMultiLine) @@ -136,6 +140,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value, { gint tmp = 0; gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &tmp ); + SetInsertionPointEnd(); } if (style & wxTE_READONLY) @@ -150,6 +155,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value, Show( TRUE ); SetBackgroundColour( parent->GetBackgroundColour() ); + SetForegroundColour( parent->GetForegroundColour() ); return TRUE; } @@ -617,11 +623,16 @@ bool wxTextCtrl::IsOwnGtkWindow( GdkWindow *window ) return (window == GTK_ENTRY(m_text)->text_area); } -void wxTextCtrl::SetFont( const wxFont &font ) +void wxTextCtrl::SetFont( const wxFont &WXUNUSED(font) ) { wxCHECK_RET( m_text != NULL, "invalid text ctrl" ); - wxControl::SetFont( font ); + // doesn't work +} + +void wxTextCtrl::SetForegroundColour( const wxColour &WXUNUSED(colour) ) +{ + wxCHECK_RET( m_text != NULL, "invalid text ctrl" ); // doesn't work } @@ -641,8 +652,16 @@ void wxTextCtrl::SetBackgroundColour( const wxColour &colour ) gdk_window_set_background( window, m_backgroundColour.GetColor() ); gdk_window_clear( window ); } +} + +void wxTextCtrl::ApplyWidgetStyle() +{ + if (m_windowStyle & wxTE_MULTILINE) + { + } else { + SetWidgetStyle(); gtk_widget_set_style( m_text, m_widgetStyle ); } }