both trackpos are placed in their respective number of records (recno ())
How can I do if when I move the second trackpos and it arrives in the same position as the first, I make the first move too? ( and viceversa)
I explain ...
it may happen that by moving the trackpos of the second scrollbar you arrive at the same date as the first scrollbar and to avoid that the second date is lower than the first how can I move the first track
the first scrollBar
- Code: Select all Expand view RUN
- @ nRow, ncol SCROLLBAR oScroll_dFirst HORIZONTAL SIZE 400,20 PIXEL OF oDlg ;
RANGE 1,ntotals_Init ;
ON DOWN ( oDbf1:Skip(),;
If( oDbf1:EoF(), oDbf1:GoBottom(),),;
Refresh_dbf1(oSay,oDbf1,@dFirst,@nInit));
ON UP ( oDbf1:Skip( -1 ),Refresh_dbf1(oSay,oDbf1,@dFirst,@nInit) )
oScroll_dFirst:oCursor:=oCursorBtn
oScroll_dFirst:bPOS = { | nPos | (oDbf1:GoTo( nPos ),;
oScroll_dFirst:SetPos( nPos ),;
oScroll_dFirst:refresh() ,;
Refresh_dbf1(oSay,oDbf1,@dFirst,@nInit)) }
the second scrollbar
- Code: Select all Expand view RUN
- @ nRow, ncol SCROLLBAR oScroll_dLast HORIZONTAL SIZE 400,20 PIXEL OF oDlg ;
RANGE 1,ntotals_End ;
ON DOWN ( oDbf2:Skip(),;
If( oDbf2:EoF(), oDbf2:GoBottom(),),;
Refresh_dbf2(oSay,oDbf2,@dLast,@nEnd));
ON UP ( oDbf2:Skip( -1 ),Refresh_dbf2(oSay,oDbf2,@dLast,@nEnd) )
oScroll_dLast:oCursor:=oCursorBtn
oScroll_dLast:bPOS = { | nPos | (oDbf2:GoTo( nPos ),;
oScroll_dLast:SetPos( nPos ),;
oScroll_dLast:refresh(),;
Refresh_dbf2(oSay,oDbf2,@dLast,@nEnd)) }