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 | IScientificNumberFormat Interface | PercentageFormat Class | INumberFormat Interface | INumericFormat Interface | FractionFormat Class | IPercentageFormat Interface | ILatLonFormat Interface | ILatLonFormat2 Interface | LatLonFormat Class | ICustomNumberFormat Interface | RateFormat Class | NumericFormat Class | ScientificFormat Class | IRateFormat Interface | AngleFormat Class | IFractionFormat Interface | CurrencyFormat Class | CustomNumberFormat Class | IAngleFormat Interface

.NET Snippets

Decimal Degree Angle Radian Example |

.NET Related Topics

Creating map grid labels |