diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 2019554161..08e459d9b1 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1350,7 +1350,10 @@ wxSize wxListCtrl::MSWGetBestViewRect(int x, int y) const if ( mswStyle & WS_VSCROLL ) size.x += wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); - return size; + // OTOH we have to subtract the size of our borders because the base class + // public method already adds them, but ListView_ApproximateViewRect() + // already takes the borders into account, so this would be superfluous. + return size - DoGetBorderSize(); } // ----------------------------------------------------------------------------