Mouse position: Difference between revisions
Content added Content deleted
m (typo) |
|||
Line 708: | Line 708: | ||
The following example shows three labels being updated with the mouse position.<br> |
The following example shows three labels being updated with the mouse position.<br> |
||
The globalmotion label is updated whenever the mouse moves anywhere within the window, but not outside it.<br> |
The globalmotion label is updated whenever the mouse moves anywhere within the window, but not outside it.<br> |
||
The canvasmotion label is updated whenever the mouse moves within the canvas, but not elsewhere in the window.<br> |
The canvasmotion label is updated whenever the mouse moves within the canvas, but not elsewhere in the window (or beyond).<br> |
||
The timer label is updated every three seconds and gets mouse positions anywhere on the whole screen, whether it moves or not.<br> |
The timer label is updated every three seconds and gets mouse positions anywhere on the whole screen, whether it moves or not.<br> |
||
Note that |
Note that canvasmotion coordinates are relative to the top left of the canvas, whereas the other two are absolute. |
||
<lang Phix>-- |
<lang Phix>-- |
||
-- demo\rosetta\Mouse_position.exw |
-- demo\rosetta\Mouse_position.exw |