Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Need help to control scrolling in the gallery
Need help to control scrolling in the gallery [message #51775] Tue, 22 April 2008 07:27 Go to next message
Trevor Campbell is currently offline Trevor CampbellFriend
Messages: 23
Registered: July 2009
Junior Member
Hi,

I am using a Gallery and am adding (using drag & drop) images into the
gallery but don't seem to be able to stop the gallery repositioning itself
to the top.

I am using SWT.VIRTUAL and gallery.clearAll(); each time I add one or more
items into the middle of the "list";

I have tried: gallery.getVerticalBar().setSelection(scrollPosition);
but that didn't quite work. The scrollbar was set but the gallery was
still positioned at the top.

I also tried gallery.showItem(item); That works pretty well but the shown
Item can be anywhere ( top or bottom) so the page jumps about a bit
unexpectedly for the user.

Any help would be appreciated
Thanks
Re: Need help to control scrolling in the gallery [message #51994 is a reply to message #51775] Thu, 24 April 2008 08:29 Go to previous message
Nicolas Richeton is currently offline Nicolas RichetonFriend
Messages: 179
Registered: July 2009
Senior Member
Hi,

If you want to use setSelection on a scrollbar, just send a selection
event right after that,
http://sharemedia.svn.sourceforge.net/viewvc/sharemedia/trun k/org.sharemedia.ui.sat/src/org/sharemedia/ui/sat/effects/Mo veScrollBarEffect.java?revision=802&view=markup

But clearAll is not supposed to reset position if Table or Tree does not
do it.

Please fill a bug if the behavior is not the same as Table.

--
Nicolas

Trevor Campbell a écrit :
> Hi,
>
> I am using a Gallery and am adding (using drag & drop) images into the
> gallery but don't seem to be able to stop the gallery repositioning
> itself to the top.
>
> I am using SWT.VIRTUAL and gallery.clearAll(); each time I add one or
> more items into the middle of the "list";
>
> I have tried: gallery.getVerticalBar().setSelection(scrollPosition);
> but that didn't quite work. The scrollbar was set but the gallery was
> still positioned at the top.
>
> I also tried gallery.showItem(item); That works pretty well but the
> shown Item can be anywhere ( top or bottom) so the page jumps about a
> bit unexpectedly for the user.
>
> Any help would be appreciated
> Thanks
>
Re: Need help to control scrolling in the gallery [message #589462 is a reply to message #51775] Thu, 24 April 2008 08:29 Go to previous message
Nicolas Richeton is currently offline Nicolas RichetonFriend
Messages: 179
Registered: July 2009
Senior Member
Hi,

If you want to use setSelection on a scrollbar, just send a selection
event right after that,
http://sharemedia.svn.sourceforge.net/viewvc/sharemedia/trun k/org.sharemedia.ui.sat/src/org/sharemedia/ui/sat/effects/Mo veScrollBarEffect.java?revision=802&view=markup

But clearAll is not supposed to reset position if Table or Tree does not
do it.

Please fill a bug if the behavior is not the same as Table.

--
Nicolas

Trevor Campbell a écrit :
> Hi,
>
> I am using a Gallery and am adding (using drag & drop) images into the
> gallery but don't seem to be able to stop the gallery repositioning
> itself to the top.
>
> I am using SWT.VIRTUAL and gallery.clearAll(); each time I add one or
> more items into the middle of the "list";
>
> I have tried: gallery.getVerticalBar().setSelection(scrollPosition);
> but that didn't quite work. The scrollbar was set but the gallery was
> still positioned at the top.
>
> I also tried gallery.showItem(item); That works pretty well but the
> shown Item can be anywhere ( top or bottom) so the page jumps about a
> bit unexpectedly for the user.
>
> Any help would be appreciated
> Thanks
>
Previous Topic:Nightly builds?
Next Topic:Disposing of items in the Gallery
Goto Forum:
  


Current Time: Fri Apr 26 03:12:58 GMT 2024

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

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

Back to the top