CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Font Size

by etwoss » 07 Nov 2014 11:34

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
etwoss
 
Posts: 1205
Joined: 06 Feb 2014 08:58

by Alexander Bulei » 10 Nov 2014 10:37

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by etwoss » 11 Nov 2014 09:35

Hi

Great thanks!

Eric
etwoss
 
Posts: 1205
Joined: 06 Feb 2014 08:58


Return to JQLabelEx

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.