tags:

views:

36

answers:

1

if I place a Border with width and height of "100%" inside a Group with width and height of 10 pixels the Border looks bigger than 10 pixels, why?

<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" 
 >

 <s:Group width="10" height="10">
  <s:Border width="100%" height="100%" borderColor="#FF0000"/>
 </s:Group>
</s:Application>
A: 

I think it's because the Border has a minimum width. I don't see Border in my version of Flex 4, but BorderContainer (maybe they changed the name recently?) has a minWidth/minHeight of 112.

viatropos
I'm not sure if this is the cause, because if you place a Group with width and height of "100%" inside a Border with width and height of 10 pixels then the Border is displayed correctly
explicit sizes override min/max, but measured sizes don't. The one you ran into is measured, this one you're describing is explicit.
viatropos