Hello,
I like the world maps and the one thing i would like to find out is, is it possible to add a mouse click event so that when the user clicks on a country the name or any other information can be captured for futher use.
there is already the interactivity tool and i tried to add the mouse event click event but was unable to come up with the correct code.
could you post the code in vb.net.
Regards
Bruce.
Private Sub EventSinkService_NodeMouseUp(ByVal args As NNodeMouseEventArgs) If args.Button = MouseButtons.Left Then Dim viewCoordinates As PointF = New PointF(args.X, args.Y) Dim sceneCoordinates As PointF = worldmap1.SceneToWorld.InvertPoint(viewCoordinates) Dim node As INNode = args.Node While (node IsNot Nothing) And (TypeOf node Is NShape = False) node = node.ParentNode End While If node Is Nothing Then Exit Sub Dim shape As NShape = TryCast(node, NShape) 'Dim shape As NShape = TryCast(args.Node, INDiagramElement) MessageBox.Show(String.Format("Shape Name: '{0}', Type: '{1}'", shape.Name, CType(shape.ParentNode, NLayer).Name)) ' mark as handled and processed to stop bubbling and processing args.Handled = True End If End Sub