public void OnMyCustomEditor(Object sender, EventArgs e) { RepCustomXRRichText.RichTextEditorForm frm = new RepCustomXRRichText.RichTextEditorForm(); frm.richTextBox1.Rtf = (this.Component as XRRichText).Rtf; frm.Owner = (this.ReportDesigner.RootReport.Tag as System.Windows.Forms.Form); frm.FormClosed += new System.Windows.Forms.FormClosedEventHandler(frm_FormClosed); frm.Show(); }
public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, System.IServiceProvider provider, object value) { IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc != null) { RepCustomXRRichText.RichTextEditorForm frm = new RepCustomXRRichText.RichTextEditorForm(); frm.richTextBox1.Rtf = (context.Instance as XRRichText).Rtf; edSvc.ShowDialog(frm); return(frm.richTextBox1.Rtf); } return(value); }