Jump to content
Software FX Community

Mouse up event and zooming


User (Legacy)

Recommended Posts

I'm using chartfx for windows forms.net version 6.0.

As per a previous posting, I am attempting to set the axis step property to

a new value when zooming in based on the values returned by GetScrollView.

I can detect when the user has dragged and released the cursor in zoom mode

by having a MouseUp event handler and reading the chart.Zoom property.

The problem is that the MouseUp event occurs before the chart gets a chance

to process the mouse up event and redraw the chart in response to the user

releasing the mouse to indicate the end of dragging for a zoom operation. In

particular, calling AxisY.GetScrollView in the MouseUp handler get the value

of the previous ScrollView/Zoomed area, not the new zoomed area that is

about to be actioned.

Is there another event or means of being informed that the chart has been

redrawn in response to the zoom?

Attached is some code. By pressing the Max-Min button, after a zoom has

occurred, it is possible to see that a the previous scrollview is still

active when the MouseUp event is fired.

Link to comment
Share on other sites

You will need to "postpone" this to AFTER you return from the MouseUp event.

The easier way to do this (I think) is to use a timer object. You create a

Windows Forms timer that fires immediately (Interval = 1). Then activate the

timer when you get the ButtonUp event.

At the Timer event, do all the processing you need.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...