+*/
+}
+
+// MyTopLabels
+
+IMPLEMENT_DYNAMIC_CLASS(MyTopLabels,wxWindow)
+
+BEGIN_EVENT_TABLE(MyTopLabels, wxWindow)
+ EVT_PAINT( MyTopLabels::OnPaint)
+END_EVENT_TABLE()
+
+MyTopLabels::MyTopLabels( wxScrolledWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size )
+ : wxWindow( parent, id, pos, size )
+{
+ m_owner = parent;
+}
+
+void MyTopLabels::OnPaint( wxPaintEvent& WXUNUSED(event) )
+{
+ wxPaintDC dc(this);
+
+ // This is wrong.. it will translate both x and y if the
+ // window is scrolled, the label windows are active in one
+ // direction only. Do the action below instead -- RL.
+ //m_owner->PrepareDC( dc );
+
+ int xScrollUnits, xOrigin;
+
+ m_owner->GetViewStart( &xOrigin, 0 );
+ m_owner->GetScrollPixelsPerUnit( &xScrollUnits, 0 );
+ dc.SetDeviceOrigin( -xOrigin * xScrollUnits, 0 );
+
+ dc.DrawText( _T("Column 1"), 5, 5 );
+ dc.DrawText( _T("Column 2"), 105, 5 );
+ dc.DrawText( _T("Column 3"), 205, 5 );
+}
+
+// MyRightLabels
+
+IMPLEMENT_DYNAMIC_CLASS(MyRightLabels,wxWindow)
+
+BEGIN_EVENT_TABLE(MyRightLabels, wxWindow)
+ EVT_PAINT( MyRightLabels::OnPaint)
+END_EVENT_TABLE()
+
+MyRightLabels::MyRightLabels( wxScrolledWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size )
+ : wxWindow( parent, id, pos, size )
+{
+ m_owner = parent;
+}
+
+void MyRightLabels::OnPaint( wxPaintEvent& WXUNUSED(event) )
+{
+ wxPaintDC dc(this);
+
+ // This is wrong.. it will translate both x and y if the
+ // window is scrolled, the label windows are active in one
+ // direction only. Do the action below instead -- RL.
+ //m_owner->PrepareDC( dc );
+
+ int yScrollUnits, yOrigin;
+
+ m_owner->GetViewStart( 0, &yOrigin );
+ m_owner->GetScrollPixelsPerUnit( 0, &yScrollUnits );
+ dc.SetDeviceOrigin( 0, -yOrigin * yScrollUnits );
+
+ dc.DrawText( _T("Row 1"), 5, 5 );
+ dc.DrawText( _T("Row 2"), 5, 30 );
+ dc.DrawText( _T("Row 3"), 5, 55 );
+ dc.DrawText( _T("Row 4"), 5, 80 );
+ dc.DrawText( _T("Row 5"), 5, 105 );
+ dc.DrawText( _T("Row 6"), 5, 130 );