IGxSystemFontNames.Item

Fore Syntax

Item(Index: Integer): String;

Fore.NET 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.

Fore 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.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Drawing;

Public Shared Sub Main(Params: StartParams);
Var
    font: GxSystemFontNames = New GxSystemFontNames();
    n: integer;
    names: string;
    i: integer;
Begin
    // 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];
        System.Diagnostics.Debug.WriteLine("Name of system font #" + i.ToString() + " = " + names);
    End For;
    System.Diagnostics.Debug.WriteLine("Number of system fonts = " + n.ToString());
End Sub;

See also:

IGxSystemFontNames