[Grid] Smooth scrolling [message #710704] |
Fri, 05 August 2011 06:22  |
Eclipse User |
|
|
|
Hi,
I'm using the Grid widget to show a number of image thumbnails, with some columns to edit information for each image. Each thumbnail is 200x150 in size.
However due to the height of each image (and depending on screen resolutions / other controls on screen) there is sometimes only space to show 3-4 rows on screen at once. This will usually result in scroll bars showing.
The annoyance in this case is that the top row is always shown as a complete cell. When scrolling, it jumps 3 cells (assuming this is based on Windows scroll settings), which can be a bit confusing when only 3-4 rows are able to be shown, as the entire screen will change.
I guess my usage of the Grid isn't all that common, and the SWT Table / Tree will always show the top row as complete too. Essentially the behaviour I'm after is similar to that of the Gallery, where scrolling is smooth, and the top of the control can be a partial image.
Does this sound possible? And does anyone have any hints where changes would be required? I've been looking within the Grid / Gallery source, but it's quite daunting with 10700 and 2600 lines of code respectively, plus supporting classes!
Thanks,
Daniel
|
|
|
Re: [Grid] Smooth scrolling [message #710730 is a reply to message #710704] |
Fri, 05 August 2011 06:50   |
Eclipse User |
|
|
|
Hi,
I guess you want the same feature one can turn on for column
setColumnScrolling().
So essentially you'll have to take a look how this implemented but it
looks like this is not really a trivial thing to change.
Tom
Am 05.08.11 12:22, schrieb Daniel MacDonald:
> Hi,
>
> I'm using the Grid widget to show a number of image thumbnails, with
> some columns to edit information for each image. Each thumbnail is
> 200x150 in size.
>
> However due to the height of each image (and depending on screen
> resolutions / other controls on screen) there is sometimes only space to
> show 3-4 rows on screen at once. This will usually result in scroll bars
> showing.
>
> The annoyance in this case is that the top row is always shown as a
> complete cell. When scrolling, it jumps 3 cells (assuming this is based
> on Windows scroll settings), which can be a bit confusing when only 3-4
> rows are able to be shown, as the entire screen will change.
>
> I guess my usage of the Grid isn't all that common, and the SWT Table /
> Tree will always show the top row as complete too. Essentially the
> behaviour I'm after is similar to that of the Gallery, where scrolling
> is smooth, and the top of the control can be a partial image.
>
> Does this sound possible? And does anyone have any hints where changes
> would be required? I've been looking within the Grid / Gallery source,
> but it's quite daunting with 10700 and 2600 lines of code respectively,
> plus supporting classes!
>
> Thanks,
> Daniel
>
|
|
|
|
|
|
Re: [Grid] Smooth scrolling [message #754403 is a reply to message #710788] |
Wed, 02 November 2011 08:57  |
Eclipse User |
|
|
|
A workaround to obtain a similar looking partial cell scrolling functionality could be to place a Grid inside a ScrolledComposite (do not use the grid's scrolling mechanism and set the scrolled composite's minimum height to something very large so the scroll bar appears from the start around the grid).
|
|
|
Powered by
FUDForum. Page generated in 0.03709 seconds