From 86a41088fde89a7e387145c4872eecd7346ac776 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 15 Sep 2007 23:35:18 +0000 Subject: [PATCH] fix the bug with not showing all the text in the text control even if there is enough space (replaces patch 1716758) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/textctrl.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index 487fb2fca0..605ac422cd 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -2442,9 +2442,12 @@ void wxTextCtrl::UpdateLastVisible() { case wxTE_HT_BEYOND: // everything is visible + SData().m_ofsHorz = 0; + + SData().m_colStart = 0; SData().m_colLastVisible = text.length(); - // calc it below + // calculate it below SData().m_posLastVisible = -1; break; @@ -3262,7 +3265,7 @@ bool wxTextCtrl::GetLineAndRow(wxTextCoord row, fine for vertical scrolling as all lines have the same height but is rather ugly for horizontal scrolling if proportional font is used. This is why we manually update and use SData().m_ofsHorz which contains the length of the string - which is hidden beyond the left borde. An important property of text + which is hidden beyond the left border. An important property of text controls using this kind of scrolling is that an entire number of characters is always shown and that parts of characters never appear on display - neither in the leftmost nor rightmost positions. @@ -3277,7 +3280,7 @@ void wxTextCtrl::ShowHorzPosition(wxCoord pos) // pos is the logical position to show - // SData().m_ofsHorz is the fisrt logical position shown + // SData().m_ofsHorz is the first logical position shown if ( pos < SData().m_ofsHorz ) { // scroll backwards -- 2.45.2