LEADTOOLS Support
Imaging
Imaging SDK Questions
How to get scrolling direction and offset?
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, November 29, 2010 5:01:06 AM(UTC)
Groups: Registered
Posts: 21
.Net n LeadTolls V17
Qustions:
1.How to track the scrolling direction and offset of RasterImageViewer?
2.Which event fire first,RasterImageViewer_TransformChanged, RasterImageViewer_ScrollViewer or RasterImageViewer_ScrollPositionChanged?
3.What's difference between RasterImageViewer_ScrollViewer and RasterImageViewer_ScrollPositionChanged?
Best Regards.
#2
Posted
:
Monday, November 29, 2010 6:18:15 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
What do you exactly mean by tracking down the scrolling direction? Do you want to know if the scroll went left/right or up/down?
From our documentation, ScrollViewer occurs when either the horizontal or vertical scroll bar of the RasterImageViewer changes.
ScrollPositionChanged, Occurs when the value of the ScrollPosition property changes. Which means it depends on the location of the auto-scroll position and not the scroll bar.
Triggering these events depends on the actions you perform on the RasterImageViewer. Please read the documentation of each event to know when it's triggered.
#3
Posted
:
Monday, November 29, 2010 6:22:09 AM(UTC)
Groups: Registered
Posts: 21
Thank you for your reply.
Yes,I want to know if the scroll went left/right or up/down and offset about scrolling.
#4
Posted
:
Tuesday, November 30, 2010 5:47:36 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
To do this, you need to catch the ScrollPositionChanged event of the RasterImageViewer and in the event, check the values of the RasterImageViewer.ScrollPosition.X and RasterImageViewer.ScrollPosition.Y properties.
To know if the scrolling was in the right/left or up/down direction, you need to save the previous values and then compare the new values with the saved values.
LEADTOOLS Support
Imaging
Imaging SDK Questions
How to get scrolling direction and offset?
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.