| [news.eclipse.platform.swt] Re: Autocomplete Combo |
|
I have no idea how to force your combo to 'popup',
however, I can tell you about your StackOverflowError. You're calling
the Combo#setItems(String[]) method within the body of your
ModifyListener. The ModifyListener is called whenever the Combo is
modified, even adding new items. When you set or add or remove the
items, the listener is called, and the whole process repeats. You'll
have to manually ensure some kind of checking to prevent this (i.e.
check a condition prior to executing your event handling code and thus
calling the Combo#setItems(String[]) method). IMHO, you should go the way of the auto-assist in JDT. I.E. create an SWT.NO_TRIM | SWT.ON_TOP Shell with a Table as it's only widget (use FillLayout and only add the Table). You can do a lot with a Table. Then you can popup and pop-down your Shell with the proper items whenever you need an auto complete. Good luck. Daniel J Aaron Farr wrote: Hello. |