Select to view content in your preferred language

FontSize is different then i Have set

1174
0
01-10-2017 09:06 AM
RakeshModi
Deactivated User

Lable FontSize is different  then I have set. I set FontSize to 10 but when I check in layer properties -> label -> fontsize is 9.75. 

My code is  --

IAnnotateLayerPropertiesCollection pAnnoLayerPropsColl = pGeoFeatureLayer.AnnotationProperties;
IElementCollection placedElements = new ElementCollectionClass();
IElementCollection unplacedElements = new ElementCollectionClass();
IAnnotateLayerProperties pAnnoLayerProps;
pAnnoLayerPropsColl.QueryItem(0, out pAnnoLayerProps, out placedElements, out unplacedElements);
pAnnoLayerProps.Class = "LabelSel";
IAnnotationExpressionEngine aAnnoVBScriptEngine = new AnnotationVBScriptEngineClass();

ITextSymbol pTextSymbol = new TextSymbolClass();
stdole.IFontDisp pFont = pTextSymbol.Font;
pFont.Bold = true;
pFont.Size = 10.0m;
pFont.Name = "Arial";
pTextSymbol.Font = pFont;

ILabelEngineLayerProperties pLELayerProps = pAnnoLayerProps as ILabelEngineLayerProperties;
pLELayerProps.ExpressionParser = aAnnoVBScriptEngine;
pLELayerProps.Expression = "["+imagenameField+"]";
pLELayerProps.Symbol = pTextSymbol;

pGeoFeatureLayer.DisplayAnnotation = true;

find attached output ...

pls help .... 

0 Kudos
0 Replies