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


INumericFormat.AlignmentWidth Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Interfaces > IN > INumericFormat Interface > INumericFormat.AlignmentWidth Property
ArcGIS Developer Help

INumericFormat.AlignmentWidth Property

The alignment width applied to the ValueToString method.

[Visual Basic .NET]
Public Property AlignmentWidth As Integer
[C#]
public int AlignmentWidth {get; set;}
[C++]
HRESULT get_AlignmentWidth(
  long width
);
[C++]
HRESULT put_AlignmentWidth(
  System.Int32* width
);
[C++]
Parameters
width [in]

width is a parameter of type long width [out, retval]
width is a parameter of type long*

Product Availability

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

Description

The AlignmentWidth property sets or returns the width (default: 12) of the resulting string the ValueToString method in the associated INumberFormat interface produces.

If the AlignmentOption property is set to esriAlignRight, the formatted number will be AlignmentWidth characters wide, padding spaces to the left of the number as needed. If AlignmentOption = esriAlignLeft, the AlignmentWidth property is ignored. The width includes plus signs and any decimal points. For example, +1,234.56 has a width of 9.

Remarks

If AlignmentOption = esriAlignRight, make sure AlignmentWidth is set wide enough to handle the resulting formatted number. If it is not, the number will not be truncated, but the length of the formatted number will be longer than the AlignmentWidth.

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