Scroll to last added thumbnail

Discussions about document viewing.
Post Reply
greenware
Posts: 16
Joined: Tue Jan 10, 2012 7:15 pm

Scroll to last added thumbnail

Post by greenware » Tue Jan 10, 2012 7:22 pm

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)

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Scroll to last added thumbnail

Post by Loïc » Tue Jan 10, 2012 8:05 pm

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,

greenware
Posts: 16
Joined: Tue Jan 10, 2012 7:15 pm

Re: Scroll to last added thumbnail

Post by greenware » Wed Jan 11, 2012 10:50 pm

Thanks! That will help immensely.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Scroll to last added thumbnail

Post by Loïc » Wed Jan 11, 2012 10:52 pm

welcome !

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

greenware
Posts: 16
Joined: Tue Jan 10, 2012 7:15 pm

Re: Scroll to last added thumbnail

Post by greenware » Mon Jan 16, 2012 8:55 pm

Perfect!! You guys are great!!

EFernkaes
Posts: 36
Joined: Fri Jul 31, 2015 5:27 pm

Re: Scroll to last added thumbnail

Post by EFernkaes » Mon Mar 09, 2020 12:00 am

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

EFernkaes
Posts: 36
Joined: Fri Jul 31, 2015 5:27 pm

Re: Scroll to last added thumbnail

Post by EFernkaes » Wed Mar 11, 2020 10:29 pm

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 11419 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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest