Clear the DC before moving its offset to ensure that it's cleared entirely and
also draw the background using the virtual, not client, size.
See #14917.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73428
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxDC& dc = *event.GetDC();
dc.SetPen(*wxGREEN_PEN);
- PrepareDC( dc );
-
// clear any junk currently displayed
dc.Clear();
- const wxSize size = GetClientSize();
+ PrepareDC( dc );
+
+ const wxSize size = GetVirtualSize();
for ( int x = 0; x < size.x; x += 15 )
{
dc.DrawLine(x, 0, x, size.y);