From b3dc3e89a606b0da0fcde14a79187d85deaa0038 Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Garcia Date: Mon, 12 Jun 2000 17:14:03 +0000 Subject: [PATCH] When calling SetValue(), the insertion point is set to the beginning, rather that to the end of the text. wx2.2 will have flags to customize this behaviour. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/textctrl.cpp | 6 ++++++ src/gtk1/textctrl.cpp | 6 ++++++ src/msw/textctrl.cpp | 6 +++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 4c1d1d901f..d7975dde5e 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -337,6 +337,12 @@ void wxTextCtrl::SetValue( const wxString &value ) { gtk_entry_set_text( GTK_ENTRY(m_text), tmp.mbc_str() ); } + + // GRG, Jun/2000: Changed this after a lot of discussion in + // the lists. wxWindows 2.2 will have a set of flags to + // customize this behaviour. + SetInsertionPoint(0); + m_modified = FALSE; } diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp index 4c1d1d901f..d7975dde5e 100644 --- a/src/gtk1/textctrl.cpp +++ b/src/gtk1/textctrl.cpp @@ -337,6 +337,12 @@ void wxTextCtrl::SetValue( const wxString &value ) { gtk_entry_set_text( GTK_ENTRY(m_text), tmp.mbc_str() ); } + + // GRG, Jun/2000: Changed this after a lot of discussion in + // the lists. wxWindows 2.2 will have a set of flags to + // customize this behaviour. + SetInsertionPoint(0); + m_modified = FALSE; } diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index d2a0214af7..cc70be0e72 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -427,7 +427,11 @@ void wxTextCtrl::SetValue(const wxString& value) // for compatibility with the GTK and because it is more logical, we // move the cursor to the end of the text after SetValue() - SetInsertionPointEnd(); + + // GRG, Jun/2000: Changed this back after a lot of discussion + // in the lists. wxWindows 2.2 will have a set of flags to + // customize this behaviour. + //SetInsertionPointEnd(); AdjustSpaceLimit(); }