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

Home » Public Forums » archive » Keyboard-events
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: Keyboard-events [message #13195 is a reply to message #13138] Sat, 24 October 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Markku Lappalainen (mtlappa@ee.oulu.fi.no.spam) writes:

> How I can add keyboard-events on my IDL-program?
>
> get_kbrd()-function can be used but that seems to work only if
> keyboard-focus is on my IDL-DE. Problem is to receive keyboards button
> pressing on my widgets.. I have window with some buttons, sliders, droplists
> etc and I need to control my UI also from keyboard so by pressing e.g. key
> 'b' would have the same same effect as pressing some button from my UI with
> mouse.

You are trying to mix apples and oranges here. The proper
way to get user input into a program with a GUI (I.e., a
widget program) is to provide a widget to accept it. In
this case you need a text widget to accept user input.
The IDLDE is a good example of a proper widget program.
It provides a command line to accept user input. Your
programs should use this as an example.

If you are running your program ONLY on Windows machines
you can add keyboard accelerators to Button widgets by
putting the "&" character in front of the letter in the
button value you wish to be the accelerator. For example:

fileID = Widget_Button(tlb, Value='&File')

This will ONLY work on Windows machines.

Cheers,

David
----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Previous Topic: Group leader
Next Topic: Re: several quick questions

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

Current Time: Thu Oct 09 23:18:03 PDT 2025

Total time taken to generate the page: 1.43981 seconds