IGxSystemFontNames.Item

Syntax

Item(Index: Integer): String;

Parameters

Index. System font index.

Description

The Item property returns name of the system font by its number.

Comments

To determine the number of system fonts, use IGxSystemFontNames.Count.

Example

Add a link to the Drawing system assembly.

Sub UserProc;
Var
    font: IGxSystemFontNames;
    n: integer;
    names: string;
    i: integer;
Begin
    // Create an object that is used to work with system fonts
    font := New GxSystemFontNames.Create;
    // Get the number of system fonts
    n := font.Count - 1;
    // Get and display names and the number of all system fonts in the console window
    For i := 1 To n Do
        names := font.Item(i - 1);
        Debug.WriteLine("Name of system font #" + i.ToString + " = " + names);
    End For;
    Debug.WriteLine("Number of system fonts = " + n.ToString);
End Sub UserProc;

After executing the example the console window displays names and the number of all system fonts.

See also:

IGxSystemFontNames