ArcObjects Library Reference  (System)    

INumericFormat.AlignmentWidth Property

The alignment width applied to the ValueToString method.

[Visual Basic 6.0]
Property AlignmentWidth As Long
[Visual Basic .NET]
Public Property AlignmentWidth As Integer
[C#]
public int AlignmentWidth {get; set;}
[Java]
public int getAlignmentWidth()
throws
    IOException,
    AutomationException
[Java]
public void setAlignmentWidth(
Long AlignmentWidth
)
throws
    IOException,
    AutomationException
[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 | IFractionFormat Interface | AngleFormat Class | IAngleFormat Interface | IPercentageFormat Interface | ICustomNumberFormat Interface | CurrencyFormat Class | LatLonFormat Class | FractionFormat Class | IRateFormat Interface | RateFormat Class | ILatLonFormat2 Interface | NumericFormat Class | CustomNumberFormat Class | INumericFormat Interface | PercentageFormat Class | IScientificNumberFormat Interface | ILatLonFormat Interface | INumberFormat Interface | ScientificFormat Class

Example

NumericFormat Example