Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Click on VISIO imported shape (Read 1272 times)
JCRonSaratoga
YaBB Newbies
*
Offline


Go Cubs Go!

Posts: 30
Joined: Apr 15th, 2008
Click on VISIO imported shape
May 1st, 2008 at 3:32pm
Print Post  
Hi
How can I add a click event to an imported VISIO shape?  I am using VB.Net.  I know information about the shapes as they are imported.  For example, I can change the color of the 1st imported shape using:

           diag.Items(0).Brush = New MindFusion.Drawing.SolidBrush(Color.IndianRed)


Thanks,
Jim
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Click on VISIO imported shape
Reply #1 - May 1st, 2008 at 6:09pm
Print Post  
Hi Jim,

Handle the NodeClicked event of the Diagram object. The NodeEventArgs.Node argument refers to the shape that has been clicked. For example:

Code
Select All
Private Sub diag_NodeClicked(ByVal sender As Object, ByVal e As MindFusion.Diagramming.NodeEventArgs) Handles diag.NodeClicked
	If Not e.MouseButton = MouseButton.Right Then Return

	' display context menu at right mouse click
	dim clickedShape as ShapeNode  = CType(e.Node, ShapeNode)
	cmFolder.Show(Me, PointToClient(MousePosition))
End Sub
 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint