|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Simple wxPython Question
I've looked at a part of the wxPython demo which shows the position of the mouse when it is clicked, "Process and Events -> PythonEvents", and I'm confused about why it can't be simpler.
So I was wondering if anybody could show me the simplest code to show the position of the mouse when it is clicked somewhere. |
|
#2
|
|||
|
|||
|
You can get the position of the mouse pointer at any time using wxGetMousePosition(). If you want to continuously display the coords then call this function at regular intervals.
You say you want to get the position of the mouse when it is clicked. If you mean when it is clicked on a control or window that you are handling yourself then it is easy - just call wxGetMousePosition() in the event handler. If you want to catch click anywhere on the screen then I don't know if it is possible in wxPython. Dave - The Developers' Coach |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Simple wxPython Question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|