TextFormat.rightMargin Property

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
TextFormat.rightMargin Property Flash 6

specifies the margin to the right of a paragraph read/write
theFormat.rightMargin

Description

The integer rightMargin property specifies the minimum horizontal space between the right border of a text field and the right edge of a paragraph, in pixels. Negative values for rightMargin are converted to 0 by ActionScript. Note that regardless of the value of rightMargin, Flash automatically adds a small gutter between text and a text field's border. There is no way to align text perfectly flush with the border of a text field. The rightMargin and leftMargin properties can be used simultaneously on the same paragraph.

For example usage, see TextFormat.leftMargin.

The default rightMargin value (as contained in the TextFormat object returned by TextField.getTextFormat( )) for a text field that contains text is 0. For a text field without any text, the rightMargin value is null. For a completely new TextFormat object, it is also null, indicating that rightMargin will not be set when the format is applied to a text field:

trace(anyUnformattedField_txt.getTextFormat().rightMargin);  // Displays: 0 var format = new TextFormat(); trace(format.rightMargin);                                   // Displays: "null"

See Also

TextFormat.blockIndent, TextFormat.leftMargin



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net