ArcObjects Library Reference  (Carto)    

IDMSGridLabel Example

This example shows how to build a complete grid label for a graticule using the IDMSGridLabel interface.

[Visual Basic 6.0]
Dim aGrat As IGraticule Set aGrat = New Graticule Dim labColor As IRgbColor Set labColor = New RgbColor labColor.Red = 25 labColor.Green = 25 labColor.Blue = 225 Dim labFont as IFontDisp Set labFont = new StdFont labFont.Name = "Arial" labFont.Italic = True labFont.Size = 10 Dim aMGrat As IMapGrid Set aMGrat = aGrat Dim DMSLF As IDMSGridLabel Set DMSLF = New DMSGridLabel DMSLF.LabelType = esriDMSLabelTypeStandard Dim LaLoF As ILatLonFormat Set LaLoF = New LatLonFormat LaLoF.ShowDirections = True DMSLF.LatLonFormat = LaLoF DMSLF.ShowZeroMinutes = True DMSLF.ShowZeroSeconds = True DMSLF.MinutesColor = labColor DMSLF.SecondsColor = labColor DMSLF.MinutesFont = labFont DMSLF.SecondsFont = labFont Dim agL As IGridLabel Set agL = DMSLF agL.Font = labFont agL.Color = labColor agL.LabelOffset = 6 aMGrat.LabelFormat = agL

[Visual Basic .NET, C#, C++]
No example is available for Visual Basic .NET, C#, or C++. To view a Visual Basic 6.0 example, click the Language Filter button Language Filter in the upper-left corner of the page.