We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

complex symbols

Thread ID:

Created:

Updated:

Platform:

Replies:

48843 Sep 5,2006 08:48 AM Feb 7,2007 07:53 PM Windows Forms 5
loading
Tags: Diagram
Administrator [Syncfusion]
Asked On September 5, 2006 08:48 AM

Hi
Having a complex symbol i want to be able to understand on which node the user has clicked.
for example, i want to know the index number of the node contained in the symbol that the user has clicked in order to paint it. in the sample below i can paint the node only if i provide a specific index number.

Private Sub Diagram1_NodeDoubleClick(ByVal sender As Object, ByVal evtArgs As Syncfusion.Windows.Forms.Diagram.NodeMouseEventArgs) Handles Diagram1.NodeDoubleClick
If TypeOf evtArgs.Node Is Syncfusion.Windows.Forms.Diagram.Symbol Then
Dim s As Syncfusion.Windows.Forms.Diagram.Symbol = evtArgs.Node
Dim sb As Syncfusion.Windows.Forms.Diagram.Polygon
sb = s.Nodes(2)
sb.FillStyle.Color = Color.Red
End If
End Sub

Thanks
Stelios Halkiotis



J.Nagarajan [Syncfusion]
Replied On September 5, 2006 03:13 PM

Hi Stelios,

Thankyou for your interest in Essential Diagram.

Please use the GetChildIndex() method of the Symbol Class in the Diagram_NodeClick event inorder to get the index of the node contained in the symbol.



[VB]
Private Sub diagram1_NodeClick(ByVal sender As Object, ByVal evtArgs As Syncfusion.Windows.Forms.Diagram.NodeMouseEventArgs) Handles diagram1.NodeClick
Dim y As Integer=Me.diagram1.Model.GetChildIndex(evtArgs.Node)



Please refer the sample attached which demonstrates this usage. In this sample, a Nested Symbol will be loaded in the Form_Load event. When you click on the Symbols you can see the Index number of the clicked symbol in the textbox and its color will be changed appropriately.

Please try this and let us know if this helps.

Thanks,
Nagaraj

NestedSymbol.zip


Administrator [Syncfusion]
Replied On September 6, 2006 02:43 AM

Hi Nagaraj

Thanks for your reply.
I cannot test the sample because there are build errors. the errors that i see are:
(184): ''MinimumSize'' is not a member of ''Syncfusion.Windows.Forms.Diagram.Model''.
(30): Interface ''System.Runtime.Serialization.ISerializable'' is already implemented by base class ''Syncfusion.Windows.Forms.Diagram.SymbolBase''.
(43): ''System.Runtime.Serialization.ISerializable.GetObjectData'' is already implemented by base class ''Syncfusion.Windows.Forms.Diagram.SymbolBase'' and cannot be implemented again.
(31): Interface ''System.Runtime.Serialization.ISerializable'' is already implemented by base class ''Syncfusion.Windows.Forms.Diagram.SymbolBase''.
(44): ''System.Runtime.Serialization.ISerializable.GetObjectData'' is already implemented by base class ''Syncfusion.Windows.Forms.Diagram.SymbolBase'' and cannot be implemented again.

Using the code suggested in your post, i always get as index value equal to zero.

Thanks for your support
Stelios Halkiotis
>Hi Stelios,

Thankyou for your interest in Essential Diagram.

Please use the GetChildIndex() method of the Symbol Class in the Diagram_NodeClick event inorder to get the index of the node contained in the symbol.



[VB]
Private Sub diagram1_NodeClick(ByVal sender As Object, ByVal evtArgs As Syncfusion.Windows.Forms.Diagram.NodeMouseEventArgs) Handles diagram1.NodeClick
Dim y As Integer=Me.diagram1.Model.GetChildIndex(evtArgs.Node)



Please refer the sample attached which demonstrates this usage. In this sample, a Nested Symbol will be loaded in the Form_Load event. When you click on the Symbols you can see the Index number of the clicked symbol in the textbox and its color will be changed appropriately.

Please try this and let us know if this helps.

Thanks,
Nagaraj

NestedSymbol.zip


J.Nagarajan [Syncfusion]
Replied On September 7, 2006 04:17 PM

Hi Stelios,

We regret for the inconvenience caused.In the present scenario of Diagram control we have no special click events for the Child nodes of the complex symbol.The Node_Click event gets fired When you click on the complex symbol.So that it always returns the index value of the complex symbol and not for the child nodes.However we will consult with our development team regarding this issue and will get back to you with more details very soon.

Thanks for your patience.

Thanks,
Nagaraj

Guy Mahieu
Replied On February 7, 2007 06:34 AM

Any news on this?

>Hi Stelios,

We regret for the inconvenience caused.In the present scenario of Diagram control we have no special click events for the Child nodes of the complex symbol.The Node_Click event gets fired When you click on the complex symbol.So that it always returns the index value of the complex symbol and not for the child nodes.However we will consult with our development team regarding this issue and will get back to you with more details very soon.

Thanks for your patience.

Thanks,
Nagaraj

J.Nagarajan [Syncfusion]
Replied On February 7, 2007 07:53 PM

Hi Guy,

Sorry for the inconvenience caused. The current diagram code was fully refactored and this refactored code version of Essential Diagram will surely have much better performance, usability and supportability. We have this functionality on our refactored code version. Due to some internal testing issues, we are not able to ship this new version in 4.4. However we will surely make this version available before the end of March.

Thanks for your patience.

Regards,
Nagaraj

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;