ArcObjects Library Reference (System)  

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(
  long width
);
[C++]

Parameters

width [out, retval]   width is a parameter of type long width [in]   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 | ILatLonFormat2 Interface | RateFormat Class | IFractionFormat Interface | ICustomNumberFormat Interface | IAngleFormat Interface | ScientificFormat Class | INumberFormat Interface | AngleFormat Class | LatLonFormat Class | INumericFormat Interface | PercentageFormat Class | CustomNumberFormat Class | IRateFormat Interface | IPercentageFormat Interface | NumericFormat Class | CurrencyFormat Class | ILatLonFormat Interface | IScientificNumberFormat Interface | FractionFormat Class

.NET Snippets

Decimal Degree Angle Radian Example