AnsweredAssumed Answered

Zooming MapControl doesn't effect ?

Question asked by taibc on Nov 1, 2012
Latest reply on Nov 5, 2012 by taibc
Hi,

I am trying to use the Zoom commands (Zoom In, zoom out) for a MapControl. But it doesn't make "Text elements" bigger (larger) or smaller. Please see my image.

[ATTACH=CONFIG]18926[/ATTACH]

I used the below function to add a text into MapControl:

public void AddTextElement(AxESRI.ArcGIS.Controls.AxMapControl map, IPoint point, string strText, string fontName, int size, double degree, short weight)         {             IGraphicsContainer pGraphicsContainer = map.ActiveView.GraphicsContainer;             ITextElement pTextElement = new TextElementClass();             IElement pElement;             IRgbColor pColor;              IFontDisp pFont = new StdFontClass() as IFontDisp;             pColor = new RgbColorClass();             pColor.Red = 0;             pColor.Green = 0;             pColor .Blue = 0;             pFont.Name = fontName;             pFont.Weight = weight;             pFont.Size = size;                         IFormattedTextSymbol formatTextSyl = new TextSymbolClass();             formatTextSyl.Font = pFont;                         formatTextSyl.HorizontalAlignment = esriTextHorizontalAlignment.esriTHALeft;             formatTextSyl.Angle = degree;              pTextElement.Text = strText;             pTextElement.Symbol = (ITextSymbol)formatTextSyl;                          pElement = (IElement)pTextElement;             pElement.Geometry = (IGeometry)point;              pGraphicsContainer.AddElement(pElement, 0);             IActiveView activeView = map.ActiveView;             activeView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);         }

Are there something wrong ?

Attachments

Outcomes