Font Object

The Font Object provides properties for retrieving information and setting options for the font used in a specified field (that is, Bold, line style, etc.). A Font Object is obtained from the Font property of the FieldObject Object. Options, such as font name, defined by this object are dependent upon the printer driver selected for the report.

Note:    You must always use a prefix when referencing the Font Object. Visual Basic includes a VB Font Object that is always included when creating a project, so conflicts will always occur unless the object is properly referenced (for example, CRPEAuto.Font). For more information see Object Naming Conflicts.

Font Object Properties

Property Description Read/Write

Application

Returns a reference to the Application Object, that this object is associated with.

Read only

Color

Returns/Sets a number representing the color of the font. The number represents an OLE color that can be set by using RGB (that is, RGB (255, 0, 0 for red) or by specifying CRColor (see table below).

Read/Write


Constant Value


crAqua

16776960


crBlack

0


crBlue

16711680


crFuchsia

16711935


crGray

8421504


crGreen

32768


crLime

65280


crMaroon

128


crNoColor

-1


crOlive

32896


crPurple

8388736


crRed

255


crSilver

12632256


crTeal

8421376


crWhite

16777215


crYellow

65536

Property Description Read/Write

Italic

Returns/Sets Boolean value indicating whether or not the font is italicized.

Read/Write

Name

Returns/Sets the name of the font. Available fonts for any report are dependent upon the printer driver selected for the report.

Read/Write

Parent

Reference to the Parent object (FieldObject Object).

Read only

Report

Reference to Report Object.

Read only

Size

Returns/Sets the point size of the font.

Read/Write

Strike
Through

Returns/Sets Boolean value indicating whether or not the font is struck out.

Read/Write

Underline

Returns/Sets Boolean value indicating whether or not the font is underlined.

Read/Write

Weight

Returns/Sets the weight of the font. CRFontWeight (see table below) can be used for convenience.

Read/Write


Constant Value


crFWBold

700


crFWDontCare

0


crFWExtraBold

800


crFWExtraLight

200


crFWHeavy

900


crFWLight

300


crFWMedium

500


crFWNormal

400


crFWSemiBold

600


crFWThin

100



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com