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.

Position problems with String.Empty in TextNode.Text

Thread ID:





26599 Mar 28,2005 01:56 PM Mar 30,2005 09:58 AM Windows Forms 1
Tags: Diagram
Jamie Wright
Asked On March 28, 2005 01:56 PM

I have a TextNode with the Text property set to String.Empty. No matter what I set the X and Y coordinates to, they are reset back to zero when the Text property is String.Empty. Is this a bug or is this exprected behavior. I obviously know a work around but is there a better way to handle this?

Administrator [Syncfusion]
Replied On March 30, 2005 09:58 AM

Hi Jamie, How are you creating and adding this TextNode to the Diagram? I tried to reproduce the described scenario, but using the InsertNodesCmd to position the empty TextNode, and it works as expected without any problems. The following is the code that I tested with, // Create a TextNode without any Text TextNode txtnode = new TextNode(); txtnode.Size = new SizeF(150,50); InsertNodesCmd inscmd = new InsertNodesCmd(); inscmd.Location = new PointF(150,50); inscmd.Nodes.Add(txtnode); this.diagramComponent.Controller.ExecuteCommand(inscmd);; Have you tried using the MoveCmd to reposition the TextNode? Thanks, Prakash Surendra Syncfusion Inc.,


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.