Windows Develop Bookmark and Share   
 index > Windows Forms General > display that xml document as a browser
 

display that xml document as a browser

Sir:

I displayed XML Document in textbox for editing .it is displaying that xml document (with tags) as black colour .I wnt to display that xml document as a browser colour with red and black colours inside tags is red colour tags blue and answers black colour

Santhosh22  Thursday, September 27, 2007 5:53 AM

I recommend you use WebBrowser or RichTextBox control instead of TextBox control to display colorful content such as XML document, as take WebBrowser control for example, you can set its EditMode on, something like this

Code Block

void Form5_Load(object sender, EventArgs e)

{

this.webBrowser1.Navigate(@"c:\test\a.xml");

this.webBrowser1.Document.ExecCommand("EditMode", true, null);

}

I recommend you use WebBrowser or RichTextBox control instead of TextBox control to display colorful content such as XML document, as take WebBrowser control for example, you can set its EditMode on, something like this

Code Block

void Form5_Load(object sender, EventArgs e)

{

this.webBrowser1.Navigate(@"c:\test\a.xml");

this.webBrowser1.Document.ExecCommand("EditMode", true, null);

}

You can use google to search for other answers

Custom Search

More Threads

• formating column in datagridview
• C# vs2005 .Net 2.0 ListView .HitTest(...) always null for ListViewItem
• object that has been separated from its underlying RCW cannot be used
• Generate C++ classes from XML schema
• Displaying Lookup Values in a DataGridView instead of Foreign key's
• CPU usage
• Preserves User Preferences in App.config file
• ControlPaint.DrawReversibleLine
• Accessing to a menuitem on parentform from a childform in C#
• Hiding/Showing Groups in a ListView control in VB2005