tags:

views:

143

answers:

3

I have been looking for a way to utilize a simple markup language, or just plain html, when displaying text in WinForm applications. I would like to avoid embedding a webbrowser control since in most of the case I just want to highlight a single word or two in a sentence.

I have looked at using a RTFControl but I believe it's a bit heavy and I don't think the "language" used to do the formatting is easy.

Is there a simple control that allows me to display strings like:

This is a sample string with different formating.

I would be really neat if it was also possible to specify a font and/or size for the text.

Oh, dotnet 3.5 and WPF/xaml is not an option.

+6  A: 

Well, just use Html. We have used the following 'FREE' control in some of our applications, and its just beautiful.

We can define the UI in HTML Markup and then render it using this control.

http://www.terrainformatica.com/htmlayout/main.whtm

Initially, we started looking at HtmlToRTF converters so that we can use an RTF control to render UI, but there is far too many options to match between the two formats. And so, we ended up using the above control.

The only pre-condition is a mention of their name in your About Box.

Vaibhav
A: 

@Vaibav

That control looks promising and I will check it out. I wonder how I didn't manage to stumble upon it before since I have been looking for a control like that for quite a while. When is Google going to give you the answers you want and not what you are asking for ;) ?

Robert Höglund
A: 

Glad I could help. Leave a comment with your experiences so that there are more opinions on this tool.

You could also of course 'accept' my answer, and give me more repo points :D

Vaibhav