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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Appending Text to HTMLUI Control

Thread ID:

Created:

Updated:

Platform:

Replies:

44440 May 23,2006 08:54 PM UTC May 25,2006 05:39 AM UTC Windows Forms 1
loading
Tags: HTMLUIControl
Eric Robishaw
Asked On May 23, 2006 08:54 PM UTC

I''m using the HTMLUI Control (awesome control, btw), as a control to show a running log of events, with formatting. Everytime something happens, I append the text property of the control: Example: htmlui1.Text += newText; where: newText contains formatted HTML tags, etc... Is this the best way to append text? I''m concerned because the control could get to the point where there is a lot of text. And each append is going to be potentially very slow. Would it be better to use the Document.Document class and append to the XML? If so, can you provide an example? (Version 4.2) Thanks Eric

Nandakumar R [Syncfusion]
Replied On May 25, 2006 05:39 AM UTC

Hi Eric, With the HTMLUI control, the user can access all the html elements in the document. My suggestion in appending a text to the HTMLUI control is to append the text to the body element of the html document displayed in the control. This can be done as follows, [C#] //Gets the body tag element in the document displayed in the HTMLUI control IHTMLElement bodyelement = this.htmluiControl1.Document.RenderRoot; //Appends text to the body tag element bodyelement.InnerHTML += "
This is a sample text to append to the body element
";
Please refer the sample attached below that adds text to the HTMLUI control display as suggested above. Please try this and let me know if this helps. Thank you, Nanda AppendText.zip

CONFIRMATION

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.

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

;