Well, during the layout phase, flex sets the minWidth and minHeight to the value of its combined children’s dimensions, if the minHeight and minWidth are undefined.  So we just skip that by defining them J   

 

It used to be different in flex 1.0 and I relied upon the parent always setting the width and height and creating scrollbars automatically, but when 1.5 came out, they changed that behavior.  1.5 allowed the children to set the width and height of the parent.  Yes it seemed really weird…  I tried to argue this, but it seemed set in stone that this is how the layout manager should work.  O well, what can you do?  So we found this workaround.

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Christoph Diefenthal
Sent: Thursday, September 22, 2005 8:39 AM
To: '[email protected]'
Subject: AW: [flexcoders] height=100% layout problem

 

Unbelievable! That works!!! Thanks very much!

How did you get that fancy idea?
Does not look right this way, does it?


> -----Ursprüngliche Nachricht-----
> Von: [email protected] [mailto:[EMAIL PROTECTED] Im
> Auftrag von Mercer, Dustin
> Gesendet: Donnerstag, 22. September 2005 16:35
> An: [email protected]
> Betreff: RE: [flexcoders] height=100% layout problem
>
> Try setting minHeight=0 and minWidth=0 on vBxContent.  I had the same
> problem with some of my layouts and that fixed :-)
>
>
>
> ________________________________
>
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Christoph Diefenthal
> Sent: Thursday, September 22, 2005 3:01 AM
> To: '[email protected]'
> Subject: [flexcoders] height=100% layout problem
>
>
>
> Hi @all,
>
> I have got a problem with my layout...
>
> I want my Application to fit into the browser window.
>
> A VBox (vBxContent) should fit into this Application and be as high as
> possible, wherefore I set its height to 100%.
>
> But if a child (canContent) within vBxContent is higher then the screen it
> pushes the vBxContent.height to canContent's height.
>
>
> How can I assure, that the vBxContent height will not get bigger?
>
>
>
>
> <mx:Application
>       xmlns:mx="http://www.macromedia.com/2003/mxml"
>       width="100%"
>       height="100%"
>       backgroundColor="#AAAAAA" >
>
>       <mx:VBox
>             id="vBxContent"
>             width="100%"
>             height="100%"
>             backgroundColor="#666666"
>             verticalAlign="middle"
>             horizontalAlign="center">
>
>             <mx:Canvas
>                   id="canContent"
>                   backgroundColor="#ffffff"
>                   width="200"
>                   height="1188"      />
>
>
>       </mx:VBox>
>       <mx:Canvas
>                   id="canAnotherComponent"
>                   backgroundColor="#ffffff"
>                   width="100"
>                   height="100"      />
>
> </mx:Application>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
>
>
>
>
> SPONSORED LINKS
> Web site design development
> <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+si
> te+design+development&w2=Computer+software+development&w3=Software+design+
> and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c
> =5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ>        Computer software
development
> <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=Web+
> site+design+development&w2=Computer+software+development&w3=Software+desig
> n+and+development&w4=Macromedia+flex&w5=Software+development+best+practice
> &c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw>        Software design and
development
> <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=We
> b+site+design+development&w2=Computer+software+development&w3=Software+des
> ign+and+development&w4=Macromedia+flex&w5=Software+development+best+practi
> ce&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ>
> Macromedia flex
> <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+de
> velopment&w2=Computer+software+development&w3=Software+design+and+developm
> ent&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.si
> g=OO6nPIrz7_EpZI36cYzBjw>        Software development best practice
> <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&w1
> =Web+site+design+development&w2=Computer+software+development&w3=Software+
> design+and+development&w4=Macromedia+flex&w5=Software+development+best+pra
> ctice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw>
>
> ________________________________
>
> YAHOO! GROUPS LINKS
>
>
>
> *      Visit your group "flexcoders
> <http://groups.yahoo.com/group/flexcoders> " on the web.
>
> *      To unsubscribe from this group, send an email to:
>       [EMAIL PROTECTED] <mailto:flexcoders-
> [EMAIL PROTECTED]>
>
> *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> <http://docs.yahoo.com/info/terms/> .
>
>
> ________________________________




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to