This document is archived and information here might be outdated.  Recommended version.


INumericFormat.AlignmentOption Property (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (System)  

INumericFormat.AlignmentOption Property

The alignment option applied to the ValueToString method.

[Visual Basic .NET]
Public Property AlignmentOption As esriNumericAlignmentEnum
[C#]
public esriNumericAlignmentEnum AlignmentOption {get; set;}
[C++]
HRESULT get_AlignmentOption(
  esriNumericAlignmentEnum* option
);
[C++]
HRESULT put_AlignmentOption(
  esriNumericAlignmentEnum option
);
[C++]

Parameters option [out, retval]
option is a parameter of type esriNumericAlignmentEnum option [in]
option is a parameter of type esriNumericAlignmentEnum

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

The AlignmentOption property sets or returns an option that tells the ValueToString method in the associated INumberFormat interface how to align formatted numbers. For example, the value �0.34�, formatted as a string with an AlignmentWidth of 5, is returned as �0.34� with an AlignmentOption of esriAlignRight and �0.34� with an AlignmentOption of esriAlignLeft.

The settings for AlignmentOption are:

Setting Description

esriAlignRight

(Default) Numbers are aligned to the right. If the AlignmentWidth property is wider than the resulting formatted number, spaces are padded at the left to make the output AlignmentWidth characters wide. If the formatted number is wider than AlignmentWidth, the number is not truncated (the same as it would be if AlignmentOption were set to esriAlignLeft).

esriAlignLeft

Numbers are aligned to the left. No spaces are padded either at the left or right. If AlignmentOption is set to esriAlignLeft, the AlignmentWidth property is ignored.

 

See Also

INumericFormat Interface | CurrencyFormat Class | IScientificNumberFormat Interface | FractionFormat Class | IPercentageFormat Interface | INumericFormat Interface | IFractionFormat Interface | NumericFormat Class | IAngleFormat Interface | LatLonFormat Class | ICustomNumberFormat Interface | PercentageFormat Class | ILatLonFormat2 Interface | ILatLonFormat Interface | RateFormat Class | IRateFormat Interface | CustomNumberFormat Class | INumberFormat Interface | ScientificFormat Class | AngleFormat Class

.NET Snippets

Decimal Degree Angle Radian Example