Page 1 of 1

Displaying part of a label's caption in bold.

Posted: Fri Sep 25, 2009 4:19 am
by Dr Danyo
As an exercise in improving user experience, does anyone know how (if at all) to make part of a label's caption display with a bold font

The thinking here is that the contrast of colour and size between the caption and its key word, makes it easier for users to pick up on when viewing the form.

The same would apply to controls that contain a label component i.e checkbox, radio button.

e.g Add cover sheet to print out.

Whilst its easy enough to do in markup such as html, I cannot seem to find a way to do this using a native JADE label (without resorting to using a JadeRichTextControl, or multiple labels).

Dr Danyo.

Re: Displaying part of a label's caption in bold.

Posted: Wed Oct 14, 2009 3:03 pm
by ascribe
have tried but failed

Re: Displaying part of a label's caption in bold.

Posted: Wed Oct 14, 2009 3:45 pm
by darrelld
You could try using a read-only, borderless, JadeRichText control ?

Re: Displaying part of a label's caption in bold.

Posted: Wed Oct 14, 2009 10:24 pm
by allistar
You could resort to using Jade drawing primitives, like Window::drawTextAt etc.

Re: Displaying part of a label's caption in bold.

Posted: Sat Oct 17, 2009 1:00 am
by Dr Danyo
Both good ideas, as I say the simplest I could find was a read only rich text control.

It wouldnt take too much effort to subclass and add a new property to store the substrings to highlight, then at run time just parse the content and set the font to bold where appropriate .

cheers - Dr D.