SetFontAttr

<< Click to Display Table of Contents >>

Navigation:  Text Functions >

SetFontAttr

Previous pageReturn to chapter overviewNext page

Sets all font-attributes at once.

method void VPE.SetFontAttr(

TextAlignment [integer] Alignment,

boolean Bold,

boolean Underlined,

boolean Italic,

boolean Strikeout

)

also supported by TVPEObject

TextAlignment [integer] Alignment

possible values are:

ActiveX / VCL

Value

Enum

Comment

ALIGN_LEFT

0

Left

 

ALIGN_RIGHT

1

Right

 

ALIGN_CENTER

2

Center

 

ALIGN_JUSTIFIED

3

Justified

 

ALIGN_JUSTIFIED_AB

5

JustifiedAb

 

boolean Bold

Value

Description

True

bold

False

not bold

boolean Underlined

Value

Description

True

underlined

False

not underlined

boolean Italic

Value

Description

True

italic

False

not italic

boolean Strikeout

Value

Description

True

strikeout

False

not strikeout

Default:

ALIGN_LEFT, False, False, False, False

Remarks:

Italic fonts are a bit higher than non-italic fonts. This is caused by the Windows System GDI. The consequence is, that italic text needs more height, which might result in clipped (not drawn) text in case the height returned by a text-render method for a non-italic font is used for an italic font.

 

ALIGN_JUSTIFIED_AB: Text will be aligned justified. In contrast to ALIGN_JUSTIFIED, which aligns the last line left aligned, the last line of the text will also be aligned justified - if it is not ending with a CR / LF character. This flag works only for plain text, not for RTF.