Widget Focus [message #81923] |
Fri, 09 November 2012 07:49 |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
Hi,
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.
Cheers,
Helder
PS: There are obscure reasons why I have to use the /show keyword in the middle of this. The main being that sometimes IDL sends my windows behind all others. The other reason is that I want to draw something in another widget and *see* it.
|
|
|