Re: Widget Focus [message #81922 is a reply to message #81921] |
Fri, 09 November 2012 08:33   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Helder writes:
> first thing is that I'm still learning on how to use widgets and probably will for the rest of my life. However, what I'm trying to do is to scroll in a widget_list up and down with the keyboard. This works fine if you once click in a widget list and then go up and down.
> What I would like to do is to have automatically the "focus" on this list so that keyboard events (up and down) are directly processed. In my code, each time a new list element is selected, something happens, namely another window receives a:
> WIDGET_CONTROL, MyOtherWidget, /show
> Then I would like to go back to my list and be able again to go up and down with the keyboard. However, it doesn't matter if I use any of these:
> WIDGET_CONTROL, MyWidgetList, /show
> or
> WIDGET_CONTROL, MyWidgetList, SET_LIST_SELECT=Selected
>
> The only way to get the keyboard running again on this widget is by clicking on it.
>
> Does anybody know if there is a way to get around this?
>
> Thanks for any help.
In general, IDL is pretty poor about giving you this kind
of control over widgets. However, there is one thing you
might try. Try setting /SHOW on the TLB containing the
list widget, then try to focus to the list widget.
I'm not expecting a lot of success. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|