Displaying part of a label's caption in bold.

Forums for specific tips, techniques and example code
User avatar
Dr Danyo
Posts: 56
Joined: Fri Aug 21, 2009 8:59 am

Displaying part of a label's caption in bold.

Postby Dr Danyo » Fri Sep 25, 2009 4:19 am

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.

ascribe
Posts: 16
Joined: Mon Sep 14, 2009 1:51 pm
Location: Australia
Contact:

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

Postby ascribe » Wed Oct 14, 2009 3:03 pm

have tried but failed

darrelld
Posts: 2
Joined: Sat Aug 15, 2009 9:31 am

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

Postby darrelld » Wed Oct 14, 2009 3:45 pm

You could try using a read-only, borderless, JadeRichText control ?

allistar
Posts: 156
Joined: Fri Aug 14, 2009 11:02 am
Location: Mount Maunganui, Tauranga

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

Postby allistar » Wed Oct 14, 2009 10:24 pm

You could resort to using Jade drawing primitives, like Window::drawTextAt etc.

User avatar
Dr Danyo
Posts: 56
Joined: Fri Aug 21, 2009 8:59 am

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

Postby Dr Danyo » Sat Oct 17, 2009 1:00 am

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.


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 16 guests

cron