scrollbar positions

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

scrollbar positions

Post by magice » Sun Mar 29, 2009 3:06 pm

I am using the MouseLoc property on mouseDown and mouseUp to report back a location on an image that I want image mapped. I am adjusting the reported numbers by the position of the image field in order to bring my upper left pixel into the 0,0, position. This works great for getting my image mapping coordinates. My problem, occurs when the image is larger then the image area. If i move the image with the scroll bars, the 0,0 position of the image area is no longer the 0,0 position of the image. My intention was to adjust the position data by the position of the scroll bars. However, i can not find a scrollbar position property for polling that data. Near as I can tell my scroll bars are not nameable objects since they were added by putting my image area into a group by itself and checking the scrollbars options in the group properties window. How can I get the scrollbar positions?

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Sun Mar 29, 2009 5:58 pm

Check the vScroll and hScroll properties.

HTH

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Post by magice » Sun Mar 29, 2009 7:09 pm

Thank you, on second look, I think I can make that work

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Post by magice » Sun Mar 29, 2009 7:46 pm

That worked perfectly, now i need to know one more thing. How can I get the cursor to draw a box while being draged between mouseDown and mouseUp? I don't want a permanant mark on the image, just a marker of the area mapped. a dotted line or tinted area would be perfect.

Post Reply