IMapLayer.Font

Syntax

Font: IGxFont;

Description

The Font property determines font parameters of a map layer label.

Example

The module is connected to the regular report, which sheet contains the map.

Add links to the Drawing, Map, Report, Tab system assemblies.

Sub LayerFont;
Var
    Sheets: IPrxSheets;
    SheetT : IPrxTable;
    Map : IMap;
    Layer : IMapLayer;
Begin
    Sheets := PrxReport.ActiveReport.Sheets;
    SheetT := Sheets.Item(0As  IPrxTable;
    Map := SheetT.TabSheet.Objects.Item(0).Extension As IMap;
    Layer := Map.Layers.FindByName("Regions");
    // Set map layer label font options
    Layer.Font := New GxFont.Create("Arial Black"81 As GxFontStyle, 3 As GxUnit);
    // Set map layer label font color
    Layer.FontColor := GxColor.FromName("Red");
    Map.Refresh;
End Sub LayerFont;

After executing the example the font options of the layer label are changed to Arial Black, font size 8, font style bold, and the Point unit of measurement. the layer label font color is changed to red:

See also:

IMapLayer