943,724 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 1280
  • Python RSS
Oct 23rd, 2008
0

Reporting X Y coordinates of mouse pointer

Expand Post »
I'd really like to be able to ask my program "where is the mouse pointer?" at any given time.

Ideally I'll want people to click and hold a button, which will cause a stream of events to occur, and then (at varying points) the program should find out where their mouse pointer is (while they are still holding down the button).

Is this possible? I've looked into the Canvas widget and feel that the answer must be there, but haven't been able to find it.
aot
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
aot is offline Offline
83 posts
since Feb 2007
Oct 23rd, 2008
1

Re: Reporting X Y coordinates of mouse pointer

Refer to this post
Reputation Points: 355
Solved Threads: 292
Veteran Poster
jlm699 is offline Offline
1,102 posts
since Jul 2008
Oct 23rd, 2008
0

Re: Reporting X Y coordinates of mouse pointer

Ahh, thanks!

I was hoping to incorporate this functionality into Tkinter though. Is this possible too?
aot
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
aot is offline Offline
83 posts
since Feb 2007
Oct 23rd, 2008
0

Re: Reporting X Y coordinates of mouse pointer

Looks like you can do that according to this post
Reputation Points: 355
Solved Threads: 292
Veteran Poster
jlm699 is offline Offline
1,102 posts
since Jul 2008
Oct 23rd, 2008
0

Re: Reporting X Y coordinates of mouse pointer

Ahh, also, his code only collects the mouse coordinates on a button click. I need to be able to query for them WHILE the person is holding down a button -- so the program has to be able to do it on its own.
aot
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
aot is offline Offline
83 posts
since Feb 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Capturing sound
Next Thread in Python Forum Timeline: regression line and loops





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC