I don't know how to keep an object moving hand in hand with a scrollbar. Here's my problem:
1. I layout a group "MyImage" with a vertical scrollbar in a card. There is a picture loaded in the group "MyImage".
2. A field "test" is layout in some position inside the group "MyImage".
I wish that the field "test" will always keep in the same position relative to the picture inside the group "MyImage" when the vertical scrollbar drag up and down.
I tried to use the following code:
Obviously the above codes do not works. The the vscroll of group "MyImage" keeps updating the "total amount" while the vertical scrollbar is dragging.on scrollbarDrag
## Get the co-ordination of group "MyImage"
put the left of group "MyImage" into x1
put the top of group "MyImage" into y1
## Update the new position
set the loc of field "test" to item 1 of the loc of field "test", item 2 of the loc of field "test" + the vscroll of group "MyImage"
end scrollbarDrag
Could you please provide some idea how to do it?
Thanks and best regards