Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Examples » SWT Section can have focus(SWT Section can have focus)
SWT Section can have focus [message #735699] Wed, 12 October 2011 14:56
R.Murali Missing name is currently offline R.Murali Missing nameFriend
Messages: 30
Registered: November 2010
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() {

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

public void focusGained(FocusEvent e) {
System.err.println("Section is focused");

When running this code i couldnt find focusgain or focuslost for section...
whether section will have focus?
Previous Topic:Server Adapter for Orion Server
Next Topic:How to work with certificates in Eclipse?
Goto Forum:

Current Time: Fri Dec 09 03:57:43 GMT 2022

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

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

Back to the top