0 Replies Latest reply on Feb 17, 2009 1:55 PM by (GordonSmith)

    [svn:fx-trunk] 4990: Initial support for truncation in TextBox and TextGraphic.

      Revision: 4990
      Author: gosmith@adobe.com
      Date: 2009-02-17 13:55:37 -0800 (Tue, 17 Feb 2009)

      Log Message:
      -----------
      Initial support for truncation in TextBox and TextGraphic.

      Their base class, TextGraphicElement, now has a truncation:int property. It defaults to 0, meaning "no truncation". Setting it to a positive integer such as 3 means "truncate to 3 lines", or fewer if 3 won't fit. Setting it to -1 means "truncate to as many lines as will fit".

      Truncation does not work when lineBreak is "explicit".

      The truncation indicator is a locale-dependent resource, the same one as for Halo text: the "truncationIndicator" resource in the "core" bundle. For en_US it is three periods; I don't remember why we haven't been using a single ellipsis character.

      TextGraphic implements this property using the new TruncationOptions class usable with TLF's TextLineFactory. TextBox does not yet implement truncation, but will.

      There is currently a TLF bug that if you apply truncation the Flex styles are ignored.

      QE Notes: Please test changing the truncation property at runtime, and switching to a locale with a different truncation indicator.
      Doc Notes: None
      Bugs: None
      Reviewer: Hans

      Modified Paths:
      --------------
      flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as
      flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/baseClasses/TextGraphicElement.a s