Labels, Grid with formatted text

ctodx
11 July 2008

Someone in WinForms R&D obviously finished his work early and decided to add something we've been talking about for a little while: formatted text for labels and such like. It's not in the Release Candidate, but will be in the v2008 vol 2 release itself.

The Label, CheckEdit, and GridView have all been enhanced to accept HTML-like markup in their text properties. Since a picture is worth a thousand words, here's what I'm talking about:

 clip_image002

Obviously we're not suggesting you change all your business apps to look like ransom demands, but at least this gives a flavor of what you can do.

The look of the label above was created with this text:

<size=20><color=green>Color</color></size><br>labels<br><u>underline</u> and <b>bold</b>

The look of the third column header was created with this text:

Do<br><size=20>a<size=+2>n<size=+2>y<size=+2>t<size=-2>h<size=-2>i<size=-2>n<size=-2>g</size>

Another thing we've added to the design-time experience with our controls is a new smart tag menu option called "Get support".

clip_image002[4]

If you are online, this starts up your browser and loads the Support Center search page, passing along the name of the product you're using and the control name itself.

IE7 screenshot

Clicking on "Report a Bug" or "Ask a Question" from here will also give you forms pre-filled with the version numbers of DXperience and Visual Studio that you're developing with.

18 comment(s)
Ray Navasarkian (DevExpress)
Ray Navasarkian (DevExpress)

"apps to look like ransom demands"

Now every once in a while Julian, you can be quite funny. :-)

11 July, 2008
Neil D
Neil D

Cool feature...to make it even more user friendly though you should be able to click on a little button that brings up an editor that would allow you to format the text w/o having to do the html.  

Also, will this work w/ fields in XtraReports?  For example

<size=20><color=green>Color</color></size><br>labels<br><u>underline</u> and <b>[FieldName]</b>.

Where FieldName is a field on a report.

Thanks,

Neil

11 July, 2008
Anonymous
Steve Schoon

I've been wanting this for such a long time....thanks!

11 July, 2008
Greg Shelton
Greg Shelton

This is really nice!  Will there be a option to retrieve the "text" value of the label without the markup?

For instance, I might want to display a "ransom" demand on the screen, but still be able to access the text without the markup.  Does that make sense?

Regardless, kudos to this impending change.

11 July, 2008
Chris Craft
Chris Craft

We were just looking for controls to due this yesterday! It's great we can just keep using DevExpress for everything. :D

It's a great idea, that I'm sure will be a big hit!

11 July, 2008
Neal
Neal

Ya know how nice it would be to format columns of text data using this approach?  HTML tables are so neat, I was wondering just this week why this isn't in Winforms.  I have tabular data I want to display in columns and I have to use a fixed width font, string.format({0,3}) etc.  It would be neat if I could use a label to show tabular data if it uses HTML type rendering!

11 July, 2008
Anonymous
Mark Miller

Julian just posted about new text formatting technology coming out in the v2008 vol 2 release of our

11 July, 2008
Matthew Roberts
Matthew Roberts

Woohoo! I frequently get asked to format part of a label - well done DX! look forward to seeing it in the flesh.

11 July, 2008
Philip Lee
Philip Lee

I hope this is in tooltips as well.

13 July, 2008
Anonymous
Tolga Erken

Please add this feature to simplebutton, thanx.

13 July, 2008
Przemyslaw Wlodarczak
Przemyslaw Wlodarczak

Will this be available for titles of tabs in TabControl?

14 July, 2008
Julian Bucknall (DevExpress)
Julian Bucknall (DevExpress)

All

Now that we have the basic markup language parser nailed and the text painting code done, we can add it to the other controls where it makes sense as and when we can. I dare say this new functionality will make it into minor releases; you won't have to wait for v2008 vol 3.

Cheers, Julian

14 July, 2008
Abalioglu Holding A.S.
Abalioglu Holding A.S.

this feature will be very usefull for a grid displaying search results with highlighted text. why dont't you add a Highlight property (maybe including ShowHighlight, HighlightText, HighlightStyle,..) to XtraGrid and make things even simpler :)

Thanx

15 July, 2008
Abalioglu Holding A.S.
Abalioglu Holding A.S.

btw, i think HighlightText property should be a string[], so that more than one word can be displayed highlighted.

or maybe, Highlight property can be derived from Collection.

15 July, 2008
Conrad Akunga
Conrad Akunga

Fantastic stuff! Now, in light of this it would be all the more fantastic if xtrabars supported a way to build a UI element like the Itunes search box :)

25 July, 2008
Jurjen de Groot
Jurjen de Groot

Well, it's now july 27th and I've download and installed v2008 vol 2 this afternoon but when I can't get this to work yet. if i set the Text property to a value a mentioned in the examples, that's exactly what I get including the 'angle-brackets' and not the highlighted/formatted text. Is the some other property I have to set (as well) ??

thnaks,

Jurjen

27 July, 2008
Jurjen de Groot
Jurjen de Groot

Found it, AllowHtml should be 'true'.

28 July, 2008
Anonymous
ctodx

Mark Miller has been honing and refining his talk The Science of Great UI for a while now, and I've

12 February, 2009

Please login or register to post comments.