Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-29000

UIComponent measurement re-sizes height or width with corresponding percentHeight or percentWidth

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK Previous
    • None
    • Spark: Label
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Other (specify version)
      Language Found: English

    Description

      Steps to reproduce:
      1. Construct layout where a label with long text can, percentHeight and percentWidth set 100, and another widget that can have space 'stolen from it'
      2. A call to validateSize() will then resize the widget based upon the long text, ignoring the container set width
      3.

      Actual Results:
      Label is resized

      Expected Results:
      Label does not spontaneously resize itself

      Workaround (if any):
      Make a derived class which overrides canSkipMeasurement() - for each MX or Spark Widget class used.

      Browser:
      Debug Player with Flex SDK 4.5.1

      Discussion:
      With respect to object's measuring themselves:

      • No change should occur to a dimension if that dimension has either an explicit or percent set.
      • If only one dimension is without explicit or percent, it should re-size without re-sizing the dimension with explicit or percent.

      This is a general problem affecting List, Label, DataGrid, Tree, etc. and presents in UIComponent.canSkipMeasurement() checking isNaN only for explicit height and width (which are set to NaN when percent height and width are set). However, other methods may be involved if only one dimension has an explicit or percent set.

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: