+*/
+}
+
+// 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 &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( "Column 1", 5, 5 );
+ dc.DrawText( "Column 2", 105, 5 );
+ dc.DrawText( "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 &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( "Row 1", 5, 5 );
+ dc.DrawText( "Row 2", 5, 30 );
+ dc.DrawText( "Row 3", 5, 55 );
+ dc.DrawText( "Row 4", 5, 80 );
+ dc.DrawText( "Row 5", 5, 105 );
+ dc.DrawText( "Row 6", 5, 130 );