AnsweredAssumed Answered

ITextElement : ArcObject C# Visual Studio 10 - Arcgis 10.1

Question asked by jgarcinuno on Apr 22, 2015
Latest reply on Apr 23, 2015 by cmk

                 The Idea is add a Text to the map, it is working fine except the COLOR, it does not take the Color defined in pRGBcolor object.  

 

                    IRgbColor pRgbcolor = new RgbColorClass();

                    pRgbcolor.Blue = 0;

                    pRgbcolor.Green = 255;

                    pRgbcolor.Red = 0;

 

                    IMask pMask = new TextSymbolClass();

                    pMask.MaskStyle = esriMaskStyle.esriMSHalo;

                    pMask.MaskSize = 2;

 

                    ITextElement pTextElement = new TextElementClass();

                    IElement pElement = pTextElement as IElement;

                    pElement.Geometry = pPagePt;

 

                    ITextSymbol pTextSymbol = new TextSymbolClass();

                    pTextSymbol.Color = pRgbcolor;

                    pTextSymbol = pMask as ITextSymbol;

                    pTextElement.Symbol = pTextSymbol as ITextSymbol;

                    pTextElement.Text = "Test";

 

 

                    pGraphicCont.AddElement(pElement, 0);

                    pMxDoc.ActivatedView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);

Outcomes