[Q] Move the cursor programatically
Bert Freudenberg
bert at isg.cs.uni-magdeburg.de
Sun Sep 7 21:50:40 UTC 2003
Martin Drautzburg wrote:
>>>What is the best way to warp the cursot to a dialog I just opened ?
>>>(other than moving the mouse of course).
>>
>>You can pop up the dialog using openInHand then the dialog is at the hand
>>position
>
> Yes, but that's not what I want. I want to place the dialog at a fixed
> position and then move the cursor there. OpenInHand requires an extra
> mouse click and feels strange for windows users.
As others have written, this is a bad idea. But if you really want to
annoy your users, break platform-independence, and make your app
unusable on a tablet pc, you can call XWarpPointer() via FFI (assuming
you're running X11). Though, as its man page states: "There is seldom
any reason for calling this function. The pointer should normally be
left to the user." If you need a guide: there are X11-FFI examples in
the image, although they are currently broken.
--
Bert
PS: Did I mention this is a Bad Idea?
More information about the Squeak-dev
mailing list
|