Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear friends,

in my window application i need to write xml tag with color.for example in the below line

VB
sTemp = "<trm>" & sTemp


i want to show trm in different color.
can anybody suggest me how to do?
Thanks in advance
Posted
Updated 7-Aug-13 1:28am
v3
Comments
Fredrik Bornander 7-Aug-13 8:11am    
Are you outputting this to a html page or a console window or a WinForms application?
jai_mca 7-Aug-13 8:32am    
based on the shortcut i need to prompt the tag with color in richtextbox

1 solution

Use RichTextBox. There you can set the color of the font.
 
Share this answer
 
Comments
jai_mca 10-Aug-13 7:02am    
Thanks friend..i already had Richtextbox.how to set color for particular tag?
Bernhard Hiller 12-Aug-13 2:40am    
Font font = new Font("Arial", 12.5f, FontStyle.Italic | FontStyle.Underline);
richTextBox.Select(start, length);
richTextBox.SelectionFont = font;
richTextBox.SelectionBackColor = Color.AliceBlue;
richTextBox.SelectionColor = Color.OrangeRed;
jai_mca 12-Aug-13 7:34am    
sTemp = "<trm>" & sTemp

in the above line how to set color for <Trm>?
when i press shortcut in richtextbox the <Trm> tag need to prompt with color

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900