By Chris Dolan - 5 Years Ago
|
How do I add this programatically?
Am using the Visual Component with CommandBars.
Thanks in advance.
Chris
|
By Nevron Support - 5 Years Ago
|
Hi Chris, It is basically the same as adding content to a section: NSection section = nRichTextViewWithCommandBarsControl1.Widget.View.Content.Sections[0];
NHeaderFooter header = new NHeaderFooter(); section.Header = header;
NParagraph par1 = new NParagraph(); NHyperlinkInline hyperlink = new NHyperlinkInline(); hyperlink.Text = "Google"; hyperlink.Hyperlink = new NUrlHyperlink("https://www.google.com"); par1.Inlines.Add(hyperlink); header.Blocks.Add(par1);
The only difference is that you need to place the objects in the section header / footer Blocks collection instead of the section blocks. Let us know if you meet any problems or have any questions.
|
By Chris Dolan - 5 Years Ago
|
That works well,
The only problem is on saving as a PDF the link is no longer a link.
Is that a bug?
Chris
|
By Nevron Support - 5 Years Ago
|
Hi Chris, Yes it is a problem with the PDF export which we'll fix for the upcoming 2019.1 version of the control.
|
By Chris Dolan - 5 Years Ago
|
Is there any workaround? I am happy to test any updated DLL please let me know what to do next.
|
By Nevron Support - 5 Years Ago
|
Hi Chris, We're currently implementing it - will let you know as soon as an update is available (in the next couple of days).
|