Page 1 of 1

Font Size

PostPosted: 07 Nov 2014 11:34
by etwoss
Hi

If i have a labelEx , i set the font size to 9

Now i want to add data to another LabelEx at run time like

Code: Select all
     IWLabelEx.TextEx.Add(Format('<font size="9" color="#808080">%s</font><BR>',[DateToStr(LastDate)]));


However i don't get the exact size as the Label set with Font, property Size = 9

How do i do this?

Eric

Re: Font Size

PostPosted: 10 Nov 2014 10:37
by Alexander Bulei
Hi Eric,

The <font> tag is not supported in HTML5!
You need use <span> or <div> with "style" property instead.

Another thing, Font.Size value is in points (not in pixel).
Useful information: link

So, here you have the example:

delphi code
IWCGJQLabelEx1.TextEx.Add(Format('<span style="font-size:9pt; color: #808080" >%s</span><BR>',[DateToStr(Now)]));


Best Regards.

Re: Font Size

PostPosted: 11 Nov 2014 09:35
by etwoss
Hi

Great thanks!

Eric