layout - size the height of a flex component to fill the space available on stage -
Using MXML I'm trying to create a layout in Flex, a canvas component and a box in the layout. The layout should always be that the box sits on the lower edge of the application and has a fixed height, while the canvas fills the remaining phase area and does not overlap with the box.
My MXML follows;
& lt; Mx: module xmlns: mx = "http://www.adobe.com/2006/mxml" width = "100%" height = "100%" layout = "full" clip content = "wrong" vertical gap = "0 "& Gt; & Lt; Mx: width of canvas = "100%" height = "100%" /> & Lt; Mx: box width = "100%" height = "30" & gt; & Lt; / Box & gt; & Lt; / Mx: module & gt;
I have tried to use a dynamic binding to set the height on the canvas (height = "{this.stage.height - 30}"), but it produces wrong results Does.
What can I accomplish without setting the height of the application's use?
I have not used a lot of modules, but it works:
& lt; Mx: application xmlns: mx = "http://www.adobe.com/2006/mxml" layout = "full" width = "100%" height = "100%" & gt; & Lt; Mx: left canvas = "0" true = "0" top = "0" below = "0" /> & Lt; Mx: hbox width = "100%" height = "50" below = "0" & gt; .... & lt; / Mx: hbox & gt; & Lt; / Mx: Applications & gt;
Hope that helps!
Comments
Post a Comment