Page 1 of 1

HOWTO display Label text with different text styles

Posted: Sun Nov 27, 2011 7:14 am
by Ricci
You like to diplay one LABEL with different text styles (normal, bold, italic, diff. colors, etc.) ?
This is very simle in HMG4.

LABEL is based on QLabel() and this widget understand XHTML. The only thing you need to know are CSS commands.

Code: Select all

DEFINE LABEL oLabel
		 ROW 10; COL  10
		 WIDTH 100; HEIGHT 20
		 VALUE "Normal <em>italic</em> <span style='color:red;'>Red</span> Normal"
END LABEL
Will display: Normal italic Red Normal


Ricci

Re: HOWTO display Label text with different text styles

Posted: Sun Nov 27, 2011 1:57 pm
by Pablo César
Very very interesting ! Thanks for your info.

Re: HOWTO display Label text with different text styles

Posted: Sun Nov 27, 2011 11:53 pm
by Rossine
Ricci wrote:You like to diplay one LABEL with different text styles (normal, bold, italic, diff. colors, etc.) ?
This is very simle in HMG4.

LABEL is based on QLabel() and this widget understand XHTML. The only thing you need to know are CSS commands.

Code: Select all

DEFINE LABEL oLabel
		 ROW 10; COL  10
		 WIDTH 100; HEIGHT 20
		 VALUE "Normal <em>italic</em> <span style='color:red;'>Red</span> Normal"
END LABEL
Will display: Normal italic Red Normal


Ricci
Hi Ricci,

I'm really amazed with the possibilities HMG.4 + QT is giving us.

Thanks to all who are making this possible :shock:

Rossine