+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;
+ int cy=0;
+ wxTreeItemId h, lastH;
+ for(h=GetFirstVisibleItem();h;h=GetNextVisible(h))
+ {
+ if (GetBoundingRect(h, itemRect))
+ {
+ cy = itemRect.GetTop();
+ dc.DrawLine(0, cy, clientSize.x, cy);
+ lastH = h;
+ }
+ }
+ if (lastH.IsOk() && GetBoundingRect(lastH, itemRect))
+ {
+ cy = itemRect.GetBottom();
+ dc.DrawLine(0, cy, clientSize.x, cy);
+ }
+}
+
+