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
m_richEditor.BeginEdit(richTextNode);
//To disable the edit mode
m_richEditor.EndEdit(true);
Please refer to the attached sample that demonstrates this completely.
http://websamples.syncfusion.com/samples/Diagram.Windows/F74207/main.htmIn 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));
this.AppendChild(richTextNode);
}
protected override void OnMouseDoubleClick()
{
base.OnMouseDoubleClick();
}
}
Please let me know if this helps.
Regards,
Nagaraj