+void wxRemotelyScrolledTreeCtrl::OnPaint(wxPaintEvent& event)
+{
+ wxPaintDC dc(this);
+
+ wxTreeCtrl::OnPaint(event);
+
+ if (! m_drawRowLines)
+ return;
+
+ // Reset the device origin since it may have been set
+ dc.SetDeviceOrigin(0, 0);
+
+ wxPen pen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
+ dc.SetPen(pen);
+ dc.SetBrush(* wxTRANSPARENT_BRUSH);
+
+ wxSize clientSize = GetClientSize();
+ wxRect itemRect;
+ wxTreeItemId h, lastH;
+ for (h=GetFirstVisibleItem();
+ h.IsOk();
+ h=GetNextVisible(h))
+ {
+ if (GetBoundingRect(h, itemRect))
+ {
+ int cy = itemRect.GetTop();
+ dc.DrawLine(0, cy, clientSize.x, cy);
+ lastH = h;
+ }
+ if (! IsVisible(h))
+ break;
+ }
+ if (lastH.IsOk() && GetBoundingRect(lastH, itemRect))
+ {
+ int cy = itemRect.GetBottom();
+ dc.DrawLine(0, cy, clientSize.x, cy);
+ }
+}
+
+