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

s:Border size does not update when a child element is included after a state change

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • None
    • Spark: BorderContainer
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:

      1. Compile and run:

      <s:Application
      xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark">

      <fx:Script>
      <![CDATA[
      protected function clickHandler(event:MouseEvent):void

      { (currentState == "state1") ? currentState = "state2" : currentState = "state1"; }

      ]]
      >
      </fx:Script>

      <s:states>
      <s:State name="state1" />
      <s:State name="state2" />
      </s:states>

      <s:Border id="toy0" width="150" backgroundColor="gray">
      <s:layout><s:VerticalLayout /></s:layout>
      <s:Button width="100" height="100" baseColor="red" label="click me" click="clickHandler(event)" />
      <s:Button width="100" height="100" baseColor="green" includeIn="state2"/>
      <s:Button width="100" height="100" baseColor="blue" />
      </s:Border>

      </s:Application>

      2. Click the "click me" button to go to state2 and include the green button

      Actual Results:

      The size of the outer gray Border did not change.

      Expected Results:

      The height of the outer gray Border should expand to cover all of its elements.

      Workaround:

      Use a s:SkinnableContainer instead of a s:Border.

      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: