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

Home » Public Forums » archive » Can't set input focus to draw widget
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Can't set input focus to draw widget [message #35207] Thu, 15 May 2003 10:39
jamesriouxctm is currently offline  jamesriouxctm
Messages: 2
Registered: June 2002
Junior Member
Hello all,

I'm trying to use a draw widget to capture keyboard events in IDL 5.6
for Macintosh OS X. The code I have written works fine on a PC but
when I move it over to the Macintosh I can't get the draw widget to
receive input focus programmatically, even though a text widget on the
same base can get focus.

Specifically, the follow piece of code works properly:
WIDGET_CONTROL, theTextWidget, /INPUT_FOCUS
but this piece of code does nothing at all:
WIDGET_CONTROL, theDrawWidget, /INPUT_FOCUS

The draw widget itself is defined as follows:
WIDGET_DRAW(base, XSIZE=512, YSIZE=512, BUTTON_EVENTS=1,
KEYBOARD_EVENTS=1, RETAIN=2)
so it should be receiving input focus, and indeed, it is on a PC.

I can give the draw widget focus by hitting Tab repeatedly, of course,
but I'd rather not make the user Tab through all of the controls on
the screen every time they want to use the keyboard for something.

I am aware of JD's hidden text widget hack, but since I'd like to
catch arrow and control keys, I don't believe that will work the way I
want it to.

Any suggestions or comments? Does Mac OS X not support keyboard input
focus for draw widgets?

James Rioux, CTM
UNB MRI Research Centre
jamesriouxctm@hotmail.com
[Message index]
 
Read Message
Previous Topic: Re: TVLCT as mouse is moved?
Next Topic: Re: Can't set input focus to draw widget

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

Current Time: Fri Oct 10 05:10:34 PDT 2025

Total time taken to generate the page: 0.96075 seconds