Page 1 of 1

Scroll to last added thumbnail

Posted: Tue Jan 10, 2012 7:22 pm
by greenware
I have a vertical thumbnail viewer and I need it to automatically scroll down to the last image everytime a new one is added.

Is there a way to do this? If not, is there a way to reverse the order so the last entered would be added to the top?

Thanks.
John

(version 8.4)

Re: Scroll to last added thumbnail

Posted: Tue Jan 10, 2012 8:05 pm
by Loïc
Hello John,
I have a vertical thumbnail viewer and I need it to automatically scroll down to the last image everytime a new one is added.

Is there a way to do this?
We will add a new method for the next release (to be published within 3 days max) that will help to do that: EnsureVisibleItem(int intemIdx);


Hope this helps.

kind regards,

Re: Scroll to last added thumbnail

Posted: Wed Jan 11, 2012 10:50 pm
by greenware
Thanks! That will help immensely.

Re: Scroll to last added thumbnail

Posted: Wed Jan 11, 2012 10:52 pm
by Loïc
welcome !

The release is already available. See: viewtopic.php?t=3455

Re: Scroll to last added thumbnail

Posted: Mon Jan 16, 2012 8:55 pm
by greenware
Perfect!! You guys are great!!

Re: Scroll to last added thumbnail

Posted: Mon Mar 09, 2020 12:00 am
by EFernkaes
Hello ORPALIS-Team,

EnsureVisibleItem(int intemIdx) is quite helpful but you can not control, on which position the now visible item in a vertical ThumbnailEx control Shows up.
That means, sometimes it shows on the topmost position, sometimes on the bottom position.

Can you easily provide a method like SetTopmostItem(int ItemIdx)
This would include "EnsureVisible" and offers the possibility, to place the first page of a document to the first upper row in the control and you can see all following pages beneath this first page.

By the way, before writing these lines, I tried to solve this on my own by subtracting VerticalScroll.LargeChange from the actual VerticalScroll.Value.
But this doesn't work, since VerticalScroll.Value is always 0 even if the scrollbar is showing and visibly has an other value than 0.

Thanks in advance.
Reinhard

Re: Scroll to last added thumbnail

Posted: Wed Mar 11, 2020 10:29 pm
by EFernkaes
I think I found the above described problem:

You have programmed an owner-draw scrollbar, that only shows its values in the Scroll_Event.

If sending the
GDThumbnailEx.VerticalScroll.Visible = True
command, there appears a second scrollbar, which refers to the
GDThumbnailEx.VerticalScroll.Minimum / Value / Maximum properties but has no effects for item display process. Nothing moves if i scroll this newly added bar.

Picture of two scrollbars:
Scrollbar.png
Scrollbar.png (28.5 KiB) Viewed 14812 times
Is there any way, to programmatically manipulate the ThumbnailEx Scrollbars outside the Scroll_Event?
Like I wrote: From other display SDK's I know the Method SetTopmostItem and SetBottomItem.
Sure, if you set an item as topmost-item, which can't be displayd as topmost item since the items should start to display from the bottom-line it must be adapted, but then it is ensured, that at least the selected item shows at the possible topmost place and all following items are shown.