Share via


FontColor property

Returns or sets the color for the text in the specified shape. Colors are matched to the closest color on the MapPoint palette. Read/write GeoRGBType.

Applies to

Objects:  Shape

Syntax

object.FontColor

Parameters

Part Description
object Required. An expression that returns a Shape object.

Remarks

GeoRGBType is identical to the Visual Basic MsoRGBType.

Example

    Sub ChangeTextToBlue()

  Dim objApp As New MapPoint.Application   Dim objMap As MapPoint.Map   Dim objLoc As MapPoint.Location
  'Set up application and get a location object   Set objMap = objApp.ActiveMap   objApp.Visible = True   objApp.UserControl = True   Set objLoc = objApp.ActiveMap.GetLocation(0, 0)
  'Create a shape at this location, then zoom to this location   Set objMap.Location = objLoc   objMap.Shapes.AddTextbox objLoc, 50, 30
  'Add text, then set the color of text to blue   objMap.Shapes.Item(1).Text = "Some text in the box"   objMap.Shapes.Item(1).FontColor = vbBlue
  End Sub