Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » SWT combo - dropdown event
SWT combo - dropdown event [message #314168] Wed, 04 April 2007 09:00
Eclipse UserFriend
I have googled around concerning SWT's Combo box and there are a lot
of stuff but nothing helpfull for me. I need an event that is posted
before the actual selection event or when the drop-down list is displayed.

I need to verify/process the contents of the edit-field before the user
makes a new selection. As with SWT.Selection the event is posted after
the edit-field has got the new value from the list and there-by the
newly entered contets is lost.

Something like:

combo.addListener(SWT.PreSelection, new Listener() { public void
handleEvent(Event e) {}});
Posted before the edit-field change contents.

or

combo.getList().addListener(SWT.Show, new Listener() { public void
handleEvent(Event e) {}});
Posted when the combo-list is displayed.

or

combo.getArrow().addListener(SWT.Selection, new Listener() { public void
handleEvent(Event e) {}});
Posted when the arrow button is pushed.

I have tried with the CCombo but it hade the drawback of deleting the newly
entered contets of the edit-field when the drop-down list is displayed.

Anyone having some code snippets which might help....

/Pelle
Previous Topic:Best practices for external libraries
Next Topic:Editor weirdness
Goto Forum:
  


Current Time: Mon Jul 21 21:58:42 EDT 2025

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

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

Back to the top