Community
Participate
Working Groups
"Gilles Philippart" <gilles.philippart@ota.fr.socgen.com> wrote in message news:9stpdd$1ie$1@rogue.oti.com... Hi all, Here is the problem : 1 - I open the WordView, input a fee entries... 2 - I open the ListenerView (that listen for selection change in WordView) 3 - I click some entries in the word view but ListenerView doesn't refresh its content... I guess it's because i click directly in the list widgtet without first setting focus on the WordView. The focus is still on the ListenerView i just opened... Besides it seems to happen only just after opening the ListenerView for the first time. If i select the WordView explicitly by clicking on its titlebar, everything works fine afterwards. Is there a way to give the focus to the WordView when selecting items in the list control ?
The problem is that there is nothing in the ListenerView that take focus. The implementation of ListenerView.setFocus() tries to set focus to the label but Labels do not take focus. Since nothing took focus when the ListenerView was opened, the WordView control was never deactivated so when you clicked on it, the activation event was not received since it was already the active control. I have changed the ListenerView to use a Text instead of Label and it worked. The UI should do something when calling setFocus to make sure a control in that view took focus.
Consider additional improvements post 2.0
Reopen for investigation
The default is for SWT to give focus to the first child that can take it.