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. Image for the cookie policy date

TextNode

Hi,
I want to create a textnode in the symbol pallet.
When editing the text inside this node in the diagram,i want that the node will be resized in a way that all text content will be appeared inside the node.

Setting "WrapText" to true did not help.

Please advice.

Thanks a lot,

Shimon.


1 Reply

J. J.Nagarajan Syncfusion Team July 2, 2008 12:09 PM UTC

Hi Shimon ,

If your intention is to auto resize the TextNode to display the complete text, then you have to create your own TextEditor and set the AutoResize attribute of BeginEdit method to true. Please refer to the following code snippet.

TextEditor m_editor;
m_editor = new TextEditor(this.diagram1.Controller);

//In BeginEdit
m_editor.BeginEdit(txtnode, true);

//In EndEdit
m_editor.EndEdit(true);

Please refer to the attached sample and the video clip for more details.

Sample: http://websamples.syncfusion.com/samples/Diagram.Windows/F74733/main.htm

Video:http://www.syncfusion.com/Product/uploads/Video_50201eb3.zip

In this sample when you click Edit->BeginEdit menuitem, the textnode will be in edit mode. After edit the text you can click on Edit->EndEdit menuitem to show the edited text.

Please let me know if this helps.

Regards,
Nagaraj


Loader.
Live Chat Icon For mobile
Up arrow icon