Mouse position

For questions about using Classic.

Post » Sun Oct 17, 2010 7:06 am

So I'm trying to set the position of an object (edit box) to MouseX MouseY but it's setting it to some odd (but consistent) location. I tried both relative and absolute positions. Any ideas?
B
11
S
2
G
3
Posts: 283
Reputation: 1,968

Post » Sun Oct 17, 2010 7:15 am

Can you post a cap?

Perhaps your edit box is on a layout that is not scrolling.
B
9
S
2
G
4
Posts: 346
Reputation: 2,726

Post » Sun Oct 17, 2010 7:42 am

It is on such a layout (and needs to be). Anything I can do to get around that?
B
11
S
2
G
3
Posts: 283
Reputation: 1,968

Post » Sun Oct 17, 2010 10:43 am

[quote="Juryiel":3r75lpom]It is on such a layout (and needs to be). Anything I can do to get around that?[/quote:3r75lpom]

If I understand correctly what you're trying to do you should look into some system expressions. Check out the following example.

[url:3r75lpom]http://dl.dropbox.com/u/2306601/seteditbox.cap[/url:3r75lpom]

It sets the editbox position when you click left using the ScrollXLeft and ScrollYTop expressions, which return the left and top visible edges of the layout. Therefore it will work correctly for nonscrolling layers.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Sun Oct 17, 2010 6:35 pm

Thanks, I was looking how to get the currecnt scroll position but couldn't find it. ScrollXLeft and ScrollYTop work :)
B
11
S
2
G
3
Posts: 283
Reputation: 1,968


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests