Load HTML File

Print Topic | Close Window

By Roman Sallin - 8 Years Ago
I have RichTextViewWithRibbon control on a form. How do I load a HTML file into this control? There is not Load-method for this control. I tried the Widget property but that did not help. There is no simple example in the documentation. I found no tutorial for such simple tasks. The example project does not show how to access...
Best regards
By Nevron Support - 8 Years Ago

You should first get the rich text view widget of the NRichTextViewWithRibbonControl by using the GetFirstDescendant method of its widget and then you can use the LoadFromFile method of the rich text view to load a file. Here's a C# code sample:

NRichTextViewWithRibbon richTextWithRibbon = nRichTextViewWithRibbonControl1.Widget;
NRichTextView richTextView = (NRichTextView)richTextWithRibbon.GetFirstDescendant(NRichTextView.NRichTextViewSchema);

By Roman Sallin - 8 Years Ago
Thank you very much! That solved the problem.