Scroll event

Discussions about the ThumbnailEx control of GdPicture.NET.
Post Reply
MarkoZ
Posts: 19
Joined: Tue Jun 29, 2010 9:30 am

Scroll event

Post by MarkoZ » Thu Oct 13, 2011 11:11 am

Hi,
I've been trying to make ThumbnailEx auto-select items on scrolling, so pages in GdViewer would change while user is scrolling thumbnails, but scroll event doesn't seem to fire correctly. I'm assuming this is a bug.

I've also tried to derive new control from ThumbnailEx and intercept WM_VSCROLL message, but I couldn't catch it. I might have done something wrong though, I don't have much experience using windows API directly.

Can you offer any assistance, regarding this matter?

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

Re: Scroll event

Post by Loïc » Thu Oct 13, 2011 12:41 pm

Him

The scroll event you are catching is the one on the base control. It is never used...

In the next release you will be able to catch a new scroll event. Here the definition:

Code: Select all

Shadows Event Scroll(ByVal Min As Integer, ByVal Max As Integer, ByVal Page As Integer, ByVal Pos As Integer, ByVal TrackPos As Integer)
Kind regards,

Loïc

MarkoZ
Posts: 19
Joined: Tue Jun 29, 2010 9:30 am

Re: Scroll event

Post by MarkoZ » Wed Oct 19, 2011 10:33 am

Hi,
I've tried to use this event, but I still can't properly implement what I had planned.

Event only reports current position of scroll bar, but not the change in position. And since event doesn't fire when user scrolls the list with up/down/pgUp/pgDown buttons, I can't keep track of changes properly. ThumnbnailEx.VerticalScroll doesn't contain correct values either. Value property of that class always stays 0, regardless of actual scrollbar position. Is there some other way, I can get current scrollbar position on request?

And another thing. I don't think Max value reported in event is calculated properly. From my tests MaxPos = Max - Page + 1.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest