Assume the GadgetInfo structure holds all the information needed to specify which gadgets need to move and what their current scroll position is - this needs to be updated once the new state of the relevant scrollbar is ascertained and then used to repaint the gadgets accordingly.
Code: Select all
Define.GadgetInfo Moving
Code: Select all
Procedure Something_VScrolled()
Protected.i vvv, egad
Protected *Tobemoved.GadgetInfo
egad=EventGadget()
vvv=GetGadgetState(egad)
Debug vvv
*Tobemoved = GetGadgetData(egad)
;Tobemoved tells the code which scrollbar has been moved, so I would replace these comments by code to
;use vvv to adjust the information in the structure and then repaint the relevant gadgets
EndProcedure
Code: Select all
SetGadgetData(VS, @Moving)
BindGadgetEvent(VS, @Something_Vscrolled())