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

Support constraints perpendicular to layout direction in HBox / VBox

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • Adobe Flex SDK 3.0 (Release)
    • None
    • mx: Box View
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Compile and run the following code:
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">

      <mx:HBox width="200" height="100" backgroundColor="white">
      <mx:Canvas top="3" bottom="3" width="50%" backgroundColor="blue" />
      <mx:Label verticalCenter="0" width="50%" text="Foo" />
      </mx:HBox>

      </mx:Application>

      Actual Results:
      The blue Canvas is invisible (because it has height 0). The text is top-aligned.

      Expected Results:
      The blue Canvas fills all the vertical space except for the top and bottom 3 pixels. The text is vertically centered.

      Workaround (if any):
      You can use padding on the HBox only if all items will have the same top/bottom margin.
      You can use verticalAlign on the HBox only if all items will be vertically centered.
      Otherwise, start wrapping everything in a nested VBox... yuck.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: