WPCubed Product Support

Create Table in Code

Hello !

I have a problem with a part of the documentation:
7.6.10 Create Table in Code

This line works well:

par.ASetCharStyle(true, WPSTY_BOLD);

When i try to change the Font - it fail:

par.ASetFontName('Tahoma');

How can I change the Font in a correct way ?

Thanks for your help.

#1 ♥ 0
3.7k Views 1 links 2 users read 1 min
support

Hi,

par.ASetFontName('Tahoma');

can only work if the characters on their own do not define a font which overrides the setting of the paragraph or the style.

Example:

cha := RTFMemo.HeaderFooter.RTFProps.AttrHelper;
cha.Clear;
cha.SetFontName('Times New Roman');
cha.SetFontSize(12);

Use cha.CharAttr as charattr value for the added text. This makes it possible to have text with different fonts in the same line.

#2 ♥ 0
This category is archived. No new posts are possible.