[Gambas-user] ScrollView properties

tobias tobiasboe1 at ...20...
Sun Jun 26 20:42:14 CEST 2011


hi,

i am really tired today so i think that's the reason why i don't 
understand entirely what you want but i think i know...
you have a big picture in a ScrollView which is scrolled somewhere and 
you want to track the mouse position relatively to 0,0 on your picture, 
right?
i thought about this the last 15minutes and i think it's important to 
know WHEN you want these information...
you can have it immediately in a PictureBox_MouseDown() event using 
Mouse.X and Mouse.Y...
otherwise, i would work with the absolute mouse positions because these 
are the only ones you can access at any time (not only in an event like 
Mouse.X and .Y) and then subtract all child positions from ME to 
PictureBox (to get the mouse position relative to the picturebox 0,0) 
and then you got it.
my first thought was using ScrollView.ScrollWidth and ScrollView.ScrollX 
but that isn't neccessary in my opinion. may it help you if i was wrong 
with my thoughts...

regards,
tobi




More information about the User mailing list