Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Listening for any scroll
Listening for any scroll [message #455008] Thu, 05 May 2005 07:37 Go to next message
Eclipse UserFriend
Originally posted by: doug-list.threepenny.net

Is there a way to listen for when a scrollbar scrolls for any reason.
For example, when using cursor keys in a text window to scroll up and
down (or lots of other indirect ways to trigger a scroll).

Calling addSelectionListener() on the scrollbar seems to only work when
the user grabs the thumb directly.

Thanks,

Doug
Re: Listening for any scroll [message #455098 is a reply to message #455008] Fri, 06 May 2005 12:23 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Sorry, selection events are triggered when the user selects the scroll bar,
not when the operating system moves it. Stand by while I hack up a snippet.

"Doug Pearson" <doug-list@threepenny.net> wrote in message
news:d5cira$dmr$1@news.eclipse.org...
> Is there a way to listen for when a scrollbar scrolls for any reason.
> For example, when using cursor keys in a text window to scroll up and
> down (or lots of other indirect ways to trigger a scroll).
>
> Calling addSelectionListener() on the scrollbar seems to only work when
> the user grabs the thumb directly.
>
> Thanks,
>
> Doug
>
Re: Listening for any scroll [message #455103 is a reply to message #455098] Fri, 06 May 2005 14:51 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet191.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup

"Steve Northover" <steve_northover@ca.ibm.com> wrote in message
news:d5fnve$o9m$1@news.eclipse.org...
> Sorry, selection events are triggered when the user selects the scroll
bar,
> not when the operating system moves it. Stand by while I hack up a
snippet.
>
> "Doug Pearson" <doug-list@threepenny.net> wrote in message
> news:d5cira$dmr$1@news.eclipse.org...
> > Is there a way to listen for when a scrollbar scrolls for any reason.
> > For example, when using cursor keys in a text window to scroll up and
> > down (or lots of other indirect ways to trigger a scroll).
> >
> > Calling addSelectionListener() on the scrollbar seems to only work when
> > the user grabs the thumb directly.
> >
> > Thanks,
> >
> > Doug
> >
>
>
Re: Listening for any scroll [message #455151 is a reply to message #455103] Sat, 07 May 2005 06:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: doug-list.threepenny.net

Wow! Steve thanks so much for the snippet.

It's also good to know that I wasn't just being dumb about the scrollbar
events.

Thanks again,

Doug

Steve Northover wrote:
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet191.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup
>
> "Steve Northover" <steve_northover@ca.ibm.com> wrote in message
> news:d5fnve$o9m$1@news.eclipse.org...
>
>>Sorry, selection events are triggered when the user selects the scroll
>
> bar,
>
>>not when the operating system moves it. Stand by while I hack up a
>
> snippet.
>
>>"Doug Pearson" <doug-list@threepenny.net> wrote in message
>>news:d5cira$dmr$1@news.eclipse.org...
>>
>>>Is there a way to listen for when a scrollbar scrolls for any reason.
>>>For example, when using cursor keys in a text window to scroll up and
>>>down (or lots of other indirect ways to trigger a scroll).
>>>
>>>Calling addSelectionListener() on the scrollbar seems to only work when
>>>the user grabs the thumb directly.
>>>
>>>Thanks,
>>>
>>>Doug
>>>
>>
>>
>
>
Re: Listening for any scroll [message #455179 is a reply to message #455151] Mon, 09 May 2005 22:58 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
The issue here is that the operating system doesn't give notification when
it changes the scrollbar. It can do it at any time.

"Doug Pearson" <doug-list@threepenny.net> wrote in message
news:d5hnql$nli$1@news.eclipse.org...
> Wow! Steve thanks so much for the snippet.
>
> It's also good to know that I wasn't just being dumb about the scrollbar
> events.
>
> Thanks again,
>
> Doug
>
> Steve Northover wrote:
> >
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet191.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup
> >
> > "Steve Northover" <steve_northover@ca.ibm.com> wrote in message
> > news:d5fnve$o9m$1@news.eclipse.org...
> >
> >>Sorry, selection events are triggered when the user selects the scroll
> >
> > bar,
> >
> >>not when the operating system moves it. Stand by while I hack up a
> >
> > snippet.
> >
> >>"Doug Pearson" <doug-list@threepenny.net> wrote in message
> >>news:d5cira$dmr$1@news.eclipse.org...
> >>
> >>>Is there a way to listen for when a scrollbar scrolls for any reason.
> >>>For example, when using cursor keys in a text window to scroll up and
> >>>down (or lots of other indirect ways to trigger a scroll).
> >>>
> >>>Calling addSelectionListener() on the scrollbar seems to only work when
> >>>the user grabs the thumb directly.
> >>>
> >>>Thanks,
> >>>
> >>>Doug
> >>>
> >>
> >>
> >
> >
>
Previous Topic:Adding context menu to table column
Next Topic:Dropdown toolbar item without push action
Goto Forum:
  


Current Time: Thu Apr 25 01:13:43 GMT 2024

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

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

Back to the top