Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How can I detect scrolling triggered by TreeNavigator ?
How can I detect scrolling triggered by TreeNavigator ? [message #496208] Mon, 09 November 2009 11:13 Go to next message
Marco mvmsoft is currently offline Marco mvmsoftFriend
Messages: 14
Registered: July 2009
Location: Germany
Junior Member
I have a horizontally scrollable tree viewer; for each column on top of it a text field for filter conditions is shown. Horizontally scrolling the tree must sync the text field positions, which is done by adding a selection listener to horizontal scrollbar, which works well.

When I navigate the tree using a Tree Cursor, the tree is scrolled horizontally when cursor placed on a cell which is not fully horizontally visible, but I receive no scroll event.

Is there a way to detect this case without listening to the TreeCursor ?
Re: How can I detect scrolling triggered by TreeNavigator ? [message #496295 is a reply to message #496208] Mon, 09 November 2009 15:53 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi,

This scroll is triggered programmatically by the cursor, which is why
there's no Selection event from the scrollbar. Unfortunately the only other
way that I can think of to be notified of this is to add a PaintItem or
EraseItem listener, which is not great because these listeners will get
called frequently for cases that you don't care about. Adding a listener to
the cursor seems like a better solution in comparison.

Grant


"mvmsoft" <sw-evaluation@gmx.net> wrote in message
news:hd8tg1$7uf$1@build.eclipse.org...
> I have a horizontally scrollable tree viewer; for each column on top of it
a text field for filter conditions is shown. Horizontally scrolling the tree
must sync the text field positions, which is done by adding a selection
listener to horizontal scrollbar, which works well.
>
> When I navigate the tree using a Tree Cursor, the tree is scrolled
horizontally when cursor placed on a cell which is not fully horizontally
visible, but I receive no scroll event.
>
> Is there a way to detect this case without listening to the TreeCursor ?
Re: How can I detect scrolling triggered by TreeNavigator ? [message #496363 is a reply to message #496295] Mon, 09 November 2009 18:57 Go to previous message
Marco mvmsoft is currently offline Marco mvmsoftFriend
Messages: 14
Registered: July 2009
Location: Germany
Junior Member
ok, this works for me, but still it is a bit of uncomfortable api behavior (still much better than paint listener Wink)
Previous Topic:ScrolledComposite with Expandablecomposite
Next Topic:[GTK][ubuntu 9.10] can't render alpha state on Shell.
Goto Forum:
  


Current Time: Fri Apr 19 01:07:12 GMT 2024

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

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

Back to the top