From a0948e2723178101851b1138a498337a03571a5c Mon Sep 17 00:00:00 2001 From: Michael Bedward Date: Thu, 27 Jul 2000 06:23:33 +0000 Subject: [PATCH] Added another hack to the collection of hacks in wxGridCellTextEditor::SetSize so that the caret will show for cells in the first row. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grid.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 33335e6cc8..4af11b94db 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; -- 2.45.2