laptop and a wrench

漏洞

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

上次发布: August 25, 2014 No Product Found
漏洞 ID 编号 NIM036041
已提交June 11, 2008
上次修改时间June 5, 2024
适用范围No Product Found
找到的版本9.2
编程语言C#
状态Will Not Be Addressed

附加信息

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

解决办法

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();}

重现步骤

漏洞 ID: NIM036041

软件:

  • No Product Found

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项