Unable to change the size of the text of the Tactical Layer by assigning the 'ITextSymbol.Size' value to
'ITacticalGraphicStyle.TextSymbol'.
最後に公開された状態: August 25, 2014No 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();}