X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5a3ef19432acb30174a8b7eb5c8c56e568fb8a3a..38b36b4c679d20adb70d1695f3be9b801fdbf556:/src/gtk/textctrl.cpp diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 05256cb4f8..7c574619e3 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -711,7 +711,10 @@ bool wxTextCtrl::Create( wxWindow *parent, // create scrolled window m_widget = gtk_scrolled_window_new( NULL, NULL ); gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( m_widget ), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); + GTK_POLICY_AUTOMATIC, + style & wxTE_NO_VSCROLL + ? GTK_POLICY_NEVER + : GTK_POLICY_AUTOMATIC ); // for ScrollLines/Pages m_scrollBar[1] = (GtkRange*)((GtkScrolledWindow*)m_widget)->vscrollbar; @@ -1247,18 +1250,7 @@ void wxTextCtrl::SetInsertionPoint( long pos ) void wxTextCtrl::SetInsertionPointEnd() { - wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") ); - - if ( IsMultiLine() ) - { - GtkTextIter end; - gtk_text_buffer_get_end_iter( m_buffer, &end ); - gtk_text_buffer_place_cursor( m_buffer, &end ); - } - else - { - gtk_editable_set_position( GTK_EDITABLE(m_text), -1 ); - } + SetInsertionPoint(-1); } void wxTextCtrl::SetEditable( bool editable ) @@ -1296,9 +1288,9 @@ bool wxTextCtrl::Enable( bool enable ) } // wxGTK-specific: called recursively by Enable, -// to give widgets an oppprtunity to correct their colours after they +// to give widgets an opportunity to correct their colours after they // have been changed by Enable -void wxTextCtrl::OnParentEnable( bool enable ) +void wxTextCtrl::OnEnabled( bool enable ) { // If we have a custom background colour, we use this colour in both // disabled and enabled mode, or we end up with a different colour under the