[Gambas-user] Wiki: ScrollArea (gb3)

Matti math.eber at ...221...
Sun Feb 20 18:42:02 CET 2011


I fought with this for a while: The wiki says, you have to draw the image inside
the Draw event handler of ScrollArea. So I did:
Draw.Image(hImg, 0, 0, Width, Height), where 0,0 is X and Y.

But when using the ScrollBars, the Drawing event is raised again, and so the
image is redrawn in the original state. No scrolling ever possible.

I found a workaround defining X/Y with the scroll positions:
Draw.Image(hImg, - ScrollArea1.ScrollX, - ScrollArea1.ScrollY, W, H)

This works, but scrolling is quite slow.

Did I miss something, or understand it completely wrong?
In any case, a hint in the wiki would be helpful.

Regards
Matti




More information about the User mailing list