[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.newcomer] SWT Combo fire selection event twice...
|
- From: shaolinq99@xxxxxxxxx (paul)
- Date: Sun, 12 Mar 2006 19:58:25 +0000 (UTC)
- Newsgroups: eclipse.newcomer
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
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) {
}
});