comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » processing keyboard events in X
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: processing keyboard events in X [message #9755 is a reply to message #9694] Wed, 13 August 1997 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
J.D. Smith writes:

> As David points out, this functionality is not built in. But if you're
> willing to settle for a hack, I have come up with one. The mouse focus
> and keyboard focus are independent, which you can use to your
> advantage. It's very simple, really. All you need to do is hide a
> widget_text widget with all_events set *underneath* your draw widget,
> and ensure its input focus is set when appropriate in the event
> handler. I have simply set focus every time through, but a better
> technique would do so only when entering the window, or when a button on
> the draw window is clicked (motion events do not remove the input
> focus), etc. I've tested this on Linux IDL v5.0, but no guarantees are
> made for other platforms (it *should* work on any of them though).

I made the mistake of reading J.D.'s code before I ran his example
program and I thought, "Nah, it ain't gonna work!". Shows you what
I know about IDL. :-)

Nice work, J.D.

There are some days when I just *LOVE* IDL. I think this is going
to be one of them. :-)

Cheers,

David

------------------------------------------------------------ -----
David Fanning, Ph.D.
Fanning Software Consulting
Customizable IDL Programming Courses
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Call External on SUN Solaris
Next Topic: Using plot_io (with correct address)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 17:16:15 PDT 2025

Total time taken to generate the page: 0.88061 seconds