DHTMLEdit - Registered Users - Helpdesk
FontHTMLSize? Equivalent for a FontSelector control.
Thread Starter: Khurram Started: 6/22/2008 5:33 AM UTC
Replies: 1
FontHTMLSize? Equivalent for a FontSelector control.
Hello,

I am using TMS components to provide a UI to the HTML editor. There is a FontSizeSelector component which allows me to select the size of the font.

The font selector returns a standard font size (like 8, 10, 12 etc), but the FontHTMLSize property is implemented differently. Is there a way for me to set and retrieve the standard font sizes from the HTML Control?

Thanks
Khurram
Re: FontHTMLSize? Equivalent for a FontSelector control.
Hello Khurram,

You can either

(a) implement a font selector limited to seven standard font sizes (8, 10, 12, 14, 18, 24, and 36 points) and map that values in points to HTML font size values of 1 thru 7 - like it is done in the demo project, see ComboBoxFontHTMLSize;

or

(b) use the CSS font mechanism to be able to set an arbitrary font size in points, for example:

ProfDHTMLEdit21.ObjectStyle := 'font-size: 9pt';


-Nicholas