Bug 5919 - [View Mgmt] [article : Creating an Eclipse view] Focus problem
Summary: [View Mgmt] [article : Creating an Eclipse view] Focus problem
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2001-11-14 13:40 EST by Eduardo Pereira CLA
Modified: 2005-08-04 08:37 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eduardo Pereira CLA 2001-11-14 13:40:11 EST
"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 ?
Comment 1 Eduardo Pereira CLA 2001-11-14 13:49:02 EST
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.
Comment 2 Kevin Haaland CLA 2002-05-02 17:03:07 EDT
Consider additional improvements post 2.0
Comment 3 Randy Giffen CLA 2002-08-08 17:04:27 EDT
Reopen for investigation
Comment 4 Tod Creasey CLA 2005-08-04 08:37:19 EDT
The default is for SWT to give focus to the first child that can take it.