Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a lightweight, preferable open source, formattable label control for .NET?

Tags:

.net

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 web browser 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 formatting.

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

Oh, .NET 3.5 and WPF/XAML is not an option.

like image 210
Robert Höglund Avatar asked Aug 08 '08 05:08

Robert Höglund


1 Answers

Well, just use HTML. We have used the following 'FREE' control in some of our applications, and it's 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.

like image 160
Vaibhav Avatar answered Oct 15 '22 21:10

Vaibhav