|
|
|
|
|
- Font characteristics
- Font management properties
- Functions that use Font variables
Font (Variable type) In french: Police
A Font variable creates a font programmatically. The characteristics of the font can be set using different WLanguage properties. A Font variable can be used: - in drawings,
- in charts,
- in print jobs,
- in the controls of a window (Font property),
- in the controls of a page (Font property),
- in the controls of a report (Font property).
Remarks:
// Declare the Font variables MyFont is Font MyFont1, MyFont2 are Fonts
// Variable initialized with the font created by FontCreate MyFont = FontCreate("Arial", 12, iBold)
MaPolice.Name = "Arial"
MyFont.Size = 12
MyFont.Bold = True
// Use a font on a window control EDT_LastName.Font = MyFont // Retrieve the font of a control MyFont1 = EDT_FirstName.Font
Remarks By default, a Font variable has the following characteristics: - "Arial",
- size 12,
- black,
- no attributes.
To programmatically set the characteristics of a Font variable, use: - The FontCreate function.
- The Font management properties (see below)
- FontSelect, which opens the standard Windows font selection dialog box.
Font management properties The following properties can be used to handle Font variables: | | Property name | Effect |
---|
Bold | Checks whether a Font variable is bold and changes the bold attribute of a Font variable. | CharacterSpacing | Gets and sets the spacing between characters of a Font variable. | Charset | Returns and changes the character set used by a Font variable. | Color | Checks and changes the color of a Font variable. | Italic | Checks whether a Font variable is italicized and changes the italic attribute of a Font variable. | LineSpacing | Gets and sets the line spacing for a Font variable. | Name | Returns and changes the name of a Font variable. | Orientation | Returns and changes the angle (in degrees) of a Font variable. | Size | Returns and changes the size (in picas) of a Font variable. | SizeUnit | Gets and sets the size unit used for a Font variable. | StrikeOut | Checks whether a Font variable is struck through and strikes through a Font variable. | Underline | Checks whether a Font variable is underlined and underlines a Font variable. |
These properties can be directly used on the Font variable. Example: MyFont is Font MyFont.Bold = True MyFont.Color = LightRed
Functions that use Font variables The following functions can be used to handle Font variables:
| | dFont | Declares the font to be used by the dText function: - in an Image control,
- in an Image variable,
- in a WDPic variable (on the background layer),
- in a picLayer variable.
| FontCreate | Creates a font definition. | FontSelect | Opens the standard Windows font selection window by selecting the specified font. | grLabelFont | Modifies the font used for the category labels of a chart. | grLegendFont | Modifies the font used for the chart legend. | grTitleFont | Modifies the font used for the chart title. | iFont | Selects the default font. |
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|