[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] SWT Combo fire selection event twice...

Hi,
I am using a Combo box with SWT.SIMPLE as its style.
The problem is that whenever an item is selected, the event is fired twice.
I think the problem is that the SIMPLE style presents two boxes on the screen,
and an item is selected from one into another. Is there a way to get around this problem? Thanks a lot.


Combo comboTest = new Combo(container,SWT.BORDER | SWT.SIMPLE);
comboTest.add("data one");
comboTest.add("data two");

comboTest.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent arg0) {
System.out.println("this is called twice");
}
public void widgetDefaultSelected(SelectionEvent e) { }
});