Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic diagramView_MouseWheel event (Read 2452 times)
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
diagramView_MouseWheel event
Jun 16th, 2012 at 5:10am
Print Post  
Dear team,

            i want to create a zoom effect in diagramview. but i didn't find mousewheel property in diagramview control. kindly help
  

if you want something then go and grab it
Back to top
 
IP Logged
 
jf2020
Junior Member
**
Offline


I love FlowChart!

Posts: 63
Joined: Feb 23rd, 2006
Re: diagramView_MouseWheel event
Reply #1 - Jun 16th, 2012 at 11:18am
Print Post  
The MouseWheel event definitely exists! Make sure that you serach for it on the diagramView and not the diagram

Code (C++)
Select All
        /// <summary>
        /// Called when the mouse wheel is used over a diagram.
        /// Default behavior is to zoom in or out of the diagram.
        /// The zooming is to the center of the visible screen.
        /// </summary>
        /// <param name="sender">Not used</param>
        /// <param name="e">Information about the mouse wheel event</param>
        private void diagramView_MouseWheel(object sender, MouseEventArgs e)
        {
            if (e.Delta > 0)
            {
                ZoomToCenter(diagramView.ZoomFactor + 10);
            }
            else if (e.Delta < 0)
            {
                ZoomToCenter(diagramView.ZoomFactor - 10);
            }
        } 

  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: diagramView_MouseWheel event
Reply #2 - Jun 18th, 2012 at 6:26am
Print Post  
Thaks jf.

         but i am searching in diagramview control only. i have attached the screen shot  FYR
  

diagramview.jpg (Attachment deleted)

if you want something then go and grab it
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: diagramView_MouseWheel event
Reply #3 - Jun 18th, 2012 at 7:32am
Print Post  
Hi,

MouseWheel is marked with a Browsable(false) attribute in the base Control class, so it's no listed in the Properties window. You can still attach a handler from the code behind:

Code
Select All
diagramView.MouseWheel += diagramView_MouseWheel; 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: diagramView_MouseWheel event
Reply #4 - Jun 18th, 2012 at 9:09am
Print Post  
Cheesy thanks stoyan
  

if you want something then go and grab it
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint