Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
Adobe Flex SDK Previous
-
None
-
None
-
Affected OS(s): All OS Platforms
Language Found: English
Description
Steps to reproduce:
1. run following code:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
minWidth="1024" minHeight="768">
<s:Group id="parentGroup" >
<mx:Label x="300" y="200" top="200" text="parent" verticalCenter="0" />
<s:Group >
<s:layout>
<s:BasicLayout/>
</s:layout>
<mx:Label x="300" y="200" text="child" top="100" bottom="50" verticalCenter="0" />
<s:Rect width="300" height="300" >
<s:stroke>
<s:SolidColorStroke color="0x00FF00"/>
</s:stroke>
</s:Rect>
</s:Group>
<s:Rect id="border" left="0" right="0" top="0" bottom="0">
<s:stroke>
<s:SolidColorStroke color="0xFF0000"/>
</s:stroke>
</s:Rect>
</s:Group>
</s:Application>
2. check position for "child" label
3.
Actual Results:
the "child" label is placed high.
Expected Results:
if remove "bottom="50" above, then "child" is placed in verticalCenter. It means "top" constraint is ignored with verticalCenter set. If that is the case, then with "bottom="50" above, bottom should be ignored as well, the child.y=(parent.height-child.height)/2+verticalCenter=(300-31)/2+0=135, now y=75
Workaround (if any):