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

How to get the RichTextEdit derived from RichTextNode

Thread ID:





74207 Jun 3,2008 02:35 PM UTC Jun 6,2008 09:07 AM UTC WinForms 1
Tags: Diagram
miya dada
Asked On June 3, 2008 02:35 PM UTC


I am evaluating the syncfusion diagram components.
I have added a RichTextNode to the diaram, and I pasted a OLE object to the RichTextNode. It works so fine.
Would you please tell me:
1. How to get the RichTextEdit which derived from RichTextNode?
2. How to catch the double-click event of the RichTextNode, and redirect this event to the OLE object in the RichTextNode?

Any help would be appreciated.


Administrator [Syncfusion]
Replied On June 6, 2008 09:07 AM UTC

Hi Kawabe ,

1. Get RichTextEditor:

RichTextEdit implements a text box control that is used for editing text nodes derived from RichTextNode. Please use the following code snippet.

RichTextEdit m_richEditor= new RichTextEdit(this.diagram1.Controller.Viewer);
//To bring the edit mode
//To disable the edit mode

Please refer to the attached sample that demonstrates this completely.


In this sample when you select the RichTextNode and click File->BeginEdit menuitem you can bring the edit mode. When you click File->EndEdit menuitem you can end the editing.

2. Catch the double-click event of the RichTextNode:

You can derive the GroupNode and add add the RichTextNode in the group. You can call OnMouseDoubleClick() method to fire double click event of the RichTextNode. Please refer to the following code snippet.

class MySymbol:Group
public MySymbol()
RichTextNode richTextNode = new RichTextNode(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}
{\f1\fnil\fcharset0 Century Gothic;}{\f2\fnil\fcharset0 Estrangelo Edessa;}}
\cf3\b\f1\fs18 RichText\cf0\b0\f0\fs17 node allows \b diagrams\b0 to be built using
\cf4\ul\i multi-colored\cf0\ulnone\i0 text with different \b\f2\fs20 font styles
\b0\f0\fs17 and \i\fs20 sizes.\par}", new RectangleF(100, 100, 140, 50));
protected override void OnMouseDoubleClick()



Please let me know if this helps.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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