Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Zoom factors collision with moving Control host (Read 1884 times)
Sushant Raut
Guest


Zoom factors collision with moving Control host
Jan 9th, 2006 at 9:51am
Print Post  
I am handling control host moving with mouse drag. It is Obvious I need to calculate mouse position according to Flowchart control and then moving perticular control host at the new point. But this looks good when zoom factor is normal. But when zoom factor changes ... then control host does not move with mouse pointer. To avoid this I have to do something like


new position = old position / (zoomfactor/100)

but this is cumbersome ??? that we need to handle it programmatically. Please tell me, Is there any method to avoid this?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Zoom factors collision with moving Control hos
Reply #1 - Jan 9th, 2006 at 9:59am
Print Post  
You could use these methods to convert from mouse to document coordinates considering the scroll and zoom values:

RectangleF ClientToDoc(Rectangle clientRect);
Rectangle DocToClient (RectangleF docRect);

If your control does not capture the mouse input and depending on the value of HostMouseAction, the flowchart could be able to capture the mouse and handle the dragging of control hosts itself.
  
Back to top
 
IP Logged
 
Sushant Raut
Guest


Re: Zoom factors collision with moving Control hos
Reply #2 - Jan 10th, 2006 at 5:26am
Print Post  
Thanx...
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint