Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » whether section will have focus?(whether section will have focus?)
whether section will have focus? [message #735706] Wed, 12 October 2011 15:06
R.Murali Missing name is currently offline R.Murali Missing nameFriend
Messages: 30
Registered: November 2010
Member
I have created a section in my project..
If section got focus i have to write some code.
If section lost focus i have to write some other code.



My Code :

FormToolkit toolkit = new FormToolkit(display);
Section section = toolkit.createSection(shell, Section.DESCRIPTION | Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);

section.setText("This is the title");
section.setDescription("-= This is a description -=");

Composite sectionComposite = toolkit.createComposite(section);
sectionComposite.setLayout(new GridLayout(2, false));

section.addFocusListener(new FocusListener() {

@Override
public void focusLost(FocusEvent e) {
System.err.println("Section is focused lost");
}

@Override
public void focusGained(FocusEvent e) {
System.err.println("Section is focused");
}
});
section.setClient(sectionComposite);


When running this code i couldnt find focusgain or focuslost for section...
whether section will have focus?
Previous Topic:Close view closes it in all perspectives
Next Topic:Is there a hook into the startup processing?
Goto Forum:
  


Current Time: Thu Nov 27 08:49:29 GMT 2014

Powered by FUDForum. Page generated in 0.14225 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software