+void wxPagedWindow::OnScroll( wxScrollEvent& event )
+{
+ wxScrollBar* pSender = (wxScrollBar*)event.GetEventObject();
+ // wxMessageBox("wxPagedWindow::OnScroll","-I->");
+ if ( pSender == mpTabScroll )
+ {
+
+ int maxUnits = GetWholeTabRowLen() / 20;
+
+ mCurentRowOfs = -event.GetPosition()*maxUnits;
+
+ mFirstTitleGap = mTitleRowStart + mCurentRowOfs + mTabTrianGap;
+
+ // let' it automatically disable itself if it's time
+ mpTabScroll->Enable( mTitleRowLen < GetWholeTabRowLen() || mCurentRowOfs < 0 );
+
+ // repaint title bars
+ wxWindowDC dc(this);
+ DrawDecorations( dc );
+ }
+ else
+ {
+ if ( !mScrollEventInProgress )
+ {
+ mScrollEventInProgress = true;
+
+ GetActiveTab()->GetEventHandler()->ProcessEvent( event );
+ }
+ else
+ {
+ // event bounced back to us, from here we
+ // know that it has traveled the loop - thus it's processed!
+
+ mScrollEventInProgress = false;
+ }
+ }
+} // wxPagedWindow::OnScroll()
+//---------------------------------------------------------------------------
+