- wxPaintDC dc(this);
-
- wxTreeCtrl::OnPaint(event);
-
- // Reset the device origin since it may have been set
- dc.SetDeviceOrigin(0, 0);
-
- wxPen pen(wxSystemSettings::GetSystemColour(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 (GetBoundingRect(lastH, itemRect))
- {
- cy = itemRect.GetBottom();
- dc.DrawLine(0, cy, clientSize.x, cy);
- }