[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Cannot add selection listener to Scrollbar on Mac os x!
|
Hello,
I have been developing a plug-in on WindowsXP and today I tried it out
on Mac OS X. One of my views contains a Table, and on Windows I can tell
when the user moves the scrollbar by adding a SelectionListener to the
table's scrollbar. For some reason this has no effect on Mac OS X. The
scrollbar appears but the listener does not respond. Can anybody explain
this behavior? What can I do to work around this problem?
Here is a snippet of code
Table table2 = new Table(parent,SWT.SINGLE | SWT.BORDER |
SWT.FULL_SELECTION );
... then I add a bunch of Columns and give the table some input...
... then I add a listener
ScrollBar rightBar = table2.getVerticalBar();
rightBar.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
... do something here...
}
}
Also, I am unable to add a SelectionListener to any TableColumn.
Also, when I add a SelectionListener to the Table itself, I get no response
table2.addSelectionListener(new SelectionListener() ...)
However if I implement it this way I get a response from the listener
table2.addListener(SWT.Selection, new Listener() ...
Your comments are greatly appreciated,
Marc