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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Event of end typing annotation text

Thread ID:

Created:

Updated:

Platform:

Replies:

108919 May 21,2013 08:20 AM UTC May 22,2013 11:30 AM UTC WinForms 1
loading
Tags: Diagram
rtoulait
Asked On May 21, 2013 08:20 AM UTC

Hi Ali,
 
The problem i had using EventSink  "NodeCollectionChanged" is that the event was handled before i type the text in the textbox so the TextNode was always empty.
Any suggestion on how to fix this ?

I would like also to associate the annotation (TextNode) to a graphic node so if i select a graphic element in the diagram and try to associate to it a textNode, the selected graphic element was not really selected (diagram.Controller.SelectionList was null).
Any help, please ?
 
Thanks in advance & kind regards,
Rabah TOULAÏT

Amsath Ali M [Syncfusion]
Replied On May 22, 2013 11:30 AM UTC

Hi Toulait,

 

Thanks for your interest in Syncfusion products.

 

1. The problem i had using EventSink  "NodeCollectionChanged" is that the event was handled before i type the text in the textbox so the TextNode was always empty.

Any suggestion on how to fix this?

We Are Glad To Inform You That We Have Achieved Your Requirement In The Below Attached Sample. Please Refer The Below Code Snippet To Resolve The Reported Issue.

 

Here Is The Code:

[C#]

void EventSink_NodeCollectionChanged(CollectionExEventArgs evtArgs)

        {

            if (evtArgs.ChangeType == CollectionExChangeType.Insert)

            {

                if (evtArgs.Element is TextNode)

                {

                    //Peform your actions

                    TextNode curNode = evtArgs.Element as TextNode;

                    if (diagram1.Controller.TextEditor.IsEditing)

                        diagram1.Controller.TextEditor.EndEdit(true);

                    curNode.Text = "TextNode";

                    diagram1.Controller.TextEditor.BeginEdit(curNode, false);

                }

            }

        }

2. I would like also to associate the annotation (TextNode) to a graphic node so if i select a graphic element in the diagram and try to associate to it a textNode, the selected graphic element was not really selected (diagram.Controller.SelectionList was null).

 

Any help, please?

Could you please share us more information probably images which clearly shows the reported issue, this will help us to investigate further and to provide a better solution to you?

 

 

Please let us know if you have any queries.

 

Regards,

Amsath Ali. M



F108838_46385ba3.zip

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.

Warning Icon 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.Close Icon

;