Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Cannot add selection listener to Scrollbar on Mac os x!
Cannot add selection listener to Scrollbar on Mac os x! [message #457301] Thu, 23 June 2005 01:02 Go to next message
Marc Robins is currently offline Marc RobinsFriend
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 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
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
>
>
Previous Topic:SashForm setting a fixed size on children
Next Topic:swt developers : inconsistent tree behaviour
Goto Forum:
  


Current Time: Thu Apr 25 14:56:04 GMT 2024

Powered by FUDForum. Page generated in 0.03082 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top