Cannot add selection listener to Scrollbar on Mac os x! [message #457301] |
Thu, 23 June 2005 01:02 |
Marc Robins Messages: 17 Registered: July 2009 |
Junior Member |
|
|
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
|
|
|
Re: Cannot add selection listener to Scrollbar on Mac os x! [message #457423 is a reply to message #457301] |
Fri, 24 June 2005 15:17 |
Steve Northover Messages: 1636 Registered: July 2009 |
Senior Member |
|
|
https://bugs.eclipse.org/bugs/show_bug.cgi?id=64686
"Marc" <marc.robins@gmail.com> wrote in message
news:d9d1o7$rci$1@news.eclipse.org...
> 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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03082 seconds