laptop and a wrench

Bug

Unable to change the size of the text of the Tactical Layer by assigning the 'ITextSymbol.Size' value to 'ITacticalGraphicStyle.TextSymbol'.

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM036041
SubmittedJune 11, 2008
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.2
Program languageC#
StatusWill Not Be Addressed

Additional Information

Font Size has no effect on Label Sizes, they are scaled to the Size specified in the Size and TextSize properties. Note some labels are scaled to th

Workaround

The size of the text can be changed using ITacticalGraphicLayer.TextSize.Following is the method that can be replaced with the existing 'TargetLayerCmd_Click' method in the code in order to change the size of the text in a Tactical Layer:private void TargetLayerCmd_Click(object sender, EventArgs e){ IMap map = this.axMapControl1.Map as IMap; // find the mole TG layers and modify / refresh them IEnumLayer enumLayer = map.get_Layers(null, true); enumLayer.Reset(); ILayer layer = null; while ((layer = enumLayer.Next()) != null) { if (layer is ITacticalGraphicLayer) { const bool TEST_SIZE = true; if (TEST_SIZE) { //test changing size double size = (layer as ITacticalGraphicLayer).TextSize; size *= 2.0; (layer as ITacticalGraphicLayer).TextSize = size; } else { // test color IRgbColor rgb = new RgbColorClass(); rgb.Green = 0; rgb.Red = 0; rgb.Blue = 255; ITacticalGraphicStyle style = new TacticalGraphicStyleClass(); style.StyleOption = moleTGStyleEnum.moleTGStyleAlternates; style.FriendlyColor = rgb; (layer as ITacticalGraphicStyleCollection).AddTacticalGraphicStyle(style, 0); (layer as ITacticalGraphicStyleCollection).Current = 0; } // end if // Code required to get a MOLE Layer to rebuild & refresh ((ICachedGraphicLayer)layer).Refresh(); } }m_ActiveView.Refresh();}

Steps to Reproduce

Bug ID: NIM036041

Software:

  • No Product Found

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options