From 2c33291c8858294b154a937913b72279ff035ac3 Mon Sep 17 00:00:00 2001 From: Michael Bedward Date: Thu, 27 Jul 2000 06:47:09 +0000 Subject: [PATCH] Copied main branch fixes for caret not showing in first row (wxmsw) and highlight not being cleared when a cell is only partially visible. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grid.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 4cb84a54b4..565ab57a21 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -538,7 +538,15 @@ void wxGridCellTextEditor::SetSize(const wxRect& rectOrig) } #else // !GTK int extra_x = ( rect.x > 2 )? 2 : 1; + +// MB: treat MSW separately here otherwise the caret doesn't show +// when the editor is in the first row. +#if defined(__WXMSW__) + int extra_y = 2; +#else int extra_y = ( rect.y > 2 )? 2 : 1; +#endif // MSW + #if defined(__WXMOTIF__) extra_x *= 2; extra_y *= 2; @@ -5586,7 +5594,7 @@ void wxGrid::SetCurrentCell( const wxGridCellCoords& coords ) HideCellEditControl(); DisableCellEditControl(); - if ( IsVisible( m_currentCellCoords ) ) + if ( IsVisible( m_currentCellCoords, FALSE ) ) { wxRect r; r = BlockToDeviceRect(m_currentCellCoords, m_currentCellCoords);