I agree its counter intuative. There is some documentation on the measure
method of box. This behaviour isn't explictly mentioned however It may be
covered if you delve into the rules on

http://livedocs.adobe.com/flex/3/langref/mx/containers/Box.html#measure()<http://livedocs.adobe.com/flex/3/langref/mx/containers/Box.html#measure%28%29>

specifically this piece "If the child's width is unset or set to a fixed
value, the child refuses to grow or shrink, so the Box container's minimum
width is equal to the value of the child's explicitWidth property"

Probably the documentation could be clearer if it does mean this. Personally
I think thats misleading and contradictory.

Regards,

Wesley Acheson

On Thu, Aug 20, 2009 at 11:19 AM, Fotis Chatzinikos <
fotis.chatzini...@gmail.com> wrote:

>
>
> Thanks! Setting the minimum height works but still its counterintuitive at
> the least...
>
> Can somebody from Adobe point me to the docs explaining this behaviour?
>
> TIA,
> Fotis
>
>
> On Thu, Aug 20, 2009 at 10:39 AM, Wesley Acheson <wesley.ache...@gmail.com
> > wrote:
>
>>
>>
>> Sorry no I meant the min height.
>>
>> I didn't have a lot of time to answer when I typed this reply out before.
>>
>> I've seen this behaviour with dataGrid and I got stuck with it too, I
>> asked here on the flexcoders mailing list.  Basically when the items in a
>> container are larger than its "height".  The container when it calculates
>> the size of the children sets the minHeight to be a height that contains all
>> its children. (or width).  It then uses the minHeight as the height of the
>> container. However if you explictly set a minHeight that is smaller than the
>> sum of the children heights e.g. 0. This minimum height isn't overridden by
>> the container.  This allows the container to pick up its height property.
>>
>> Thats the tehory behind why I suggested it. I don't know if it works for
>> VBox and I don't know if the problem applies to numeric heights as opposed
>> to percentage heights. However I thought it may be worth a shot as its an
>> easy thing to test.
>>
>> Regards,
>>
>> Wes
>>
>> On Thu, Aug 20, 2009 at 12:23 AM, Fotis Chatzinikos <
>> fotis.chatzini...@gmail.com> wrote:
>>
>>>
>>>
>>> Hi Wesley, do you mean the maxHeight?
>>>
>>> My problem is with the height of the box getting bigger than the
>>> application instead of staying @ bottom 10.
>>>
>>> If i set the height or maxHeight it works as advertised.
>>>
>>> I am not trying to just fix it though.. I am trying to understand/know
>>> why it does not work..
>>>
>>> Thanks, for the reply though
>>>
>>>
>>> On Thu, Aug 20, 2009 at 12:47 AM, Wesley Acheson <
>>> wesley.ache...@gmail.com> wrote:
>>>
>>>>
>>>>
>>>> try setting the minWidth also.
>>>>
>>>> On Wed, Aug 19, 2009 at 6:29 PM, fotis.chatzinikos <
>>>> fotis.chatzini...@gmail.com> wrote:
>>>>
>>>>> <mx:Application
>>>>>        xmlns:mx="http://www.adobe.com/2006/mxml";
>>>>>        width="640"
>>>>>        height="480"
>>>>>        >
>>>>>        <mx:VBox top="100" bottom="10" horizontalCenter="0" width="90%"
>>>>> horizontalAlign="left" verticalGap="5" id="debugWinVB_ID">
>>>>>        </mx:VBox>
>>>>> </mx:Application>
>>>>>
>>>>>
>>>>> At the start of the application the VBox height is 370
>>>>> (Application.height - vbox.top - vbox.bottom) -> Correct.
>>>>>
>>>>> Child labels are added to this vbox in runtime and as soon as the
>>>>> cumulative labels height becomes > 370 the vbox expands and scroll bars
>>>>> appear @ the Application level...Why?
>>>>>
>>>>> Should not the Vbox remain @ 370 height and display inner scrollbars,
>>>>> according to the following rule:?
>>>>>
>>>>>    * Component size determined by a pair of constraint-based layout
>>>>> properties (left-right or top-bottom) overrides any explicit or
>>>>> percentage-based size specifications. For example, if you specify both 
>>>>> left
>>>>> and right constraints, the calculated constraint-based width overrides the
>>>>> width set by a width or percentWidth property.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------
>>>>>
>>>>> --
>>>>> Flexcoders Mailing List
>>>>> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>>>>> Alternative FAQ location:
>>>>> https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
>>>>>  Search Archives:
>>>>> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
>>>>> Links
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Fotis Chatzinikos, Ph.D.
>>> Founder,
>>> Phinnovation
>>> fotis.chatzini...@gmail.com,
>>>
>>>
>>>
>>
>
>
> --
> Fotis Chatzinikos, Ph.D.
> Founder,
> Phinnovation
> fotis.chatzini...@gmail.com,
>
>
> 
>

Reply via email to