X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0c133e13b36a923c65f94499554e432bc3a0daa..d07e1e0c13c99291bf1d81f5bcfe252f9d9d4010:/src/msw/textctrl.cpp?ds=sidebyside diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 3b9129f0a4..f394ce44e2 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -858,8 +858,9 @@ wxString wxTextCtrl::GetRange(long from, long to) const else #endif // wxUSE_RICHEDIT { - // retrieve all text - str = wxGetWindowText(GetHWND()); + // retrieve all text: wxTextEntry method works even for multiline + // controls and must be used for single line ones to account for hints + str = wxTextEntry::GetValue(); // need only a range? if ( from < to ) @@ -882,7 +883,7 @@ void wxTextCtrl::DoSetValue(const wxString& value, int flags) // comparing it with the old one (chances are that it will be different // anyhow, this comparison is there to avoid flicker for small single-line // edit controls mostly) - if ( (value.length() > 0x400) || (value != GetValue()) ) + if ( (value.length() > 0x400) || (value != DoGetValue()) ) { DoWriteText(value, flags /* doesn't include SelectionOnly here */);