FlowBox has a pretty serious bug having to do with how it does its height
calculation. This bug has been logged and has remained unresolved for far
too long (I say this as the main flexlib maintainer, it's basically my
laziness that has kept this from being fixed). That said, there's a second
container in FlexLib that also accomplishes the same goal, it's called
FlowContainer. It was origianlly written as part of the docking toolbar
component. It more or less does the exact same thing, but doesn't have the
problem with the height calculation.

So I'd advise trying to use FlowContainer instead of FlowBox, I bet it will
solve your problem.

Doug

On Tue, May 12, 2009 at 5:56 PM, Mike Oliver <moli...@corenttech.com> wrote:

>
>
>
> Yes its the flow box see attached.
>
> http://www.nabble.com/file/p23513630/ToolbarDemo.swf ToolbarDemo.swf
>
> It looks like the flow box calculates its height based on all components
> wrapping.
>
> Ollie
>
>
> Tracy Spratt-2 wrote:
> >
> > Is it the FlowBox that is causing the problem? What happens if you
> > replace
> > it with an HBox? Do you still get that space? Can you put a border or
> > background on the FlowBox to see if it is causing the layout issue?
> >
> >
> >
> > Something is confusing the layout. The space between items in a VBox
> > should
> > be only the verticalGap.
> >
> >
> >
> > Tracy Spratt,
> >
> > Lariat Services, development services available
> >
> > _____
> >
> > From: flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com> [mailto:
> flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>] On
> > Behalf Of Mike Oliver
> > Sent: Tuesday, May 12, 2009 8:13 PM
> > To: flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>
> > Subject: RE: [flexcoders] FlowBox Nesting
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > I said that I tried a VBox and that did NOT give me what I want,
> >
> > Here is the mxml
> >
> > <mx:VBox x="10" y="42" height="650" width="100%">
> >
> > <ns1:FlowBox width="100%" paddingBottom="10" paddingLeft="10"
> > paddingRight="10" paddingTop="10" left="10">
> > <mx:ComboBox></mx:ComboBox>
> > <mx:DateField/>
> > <mx:Button label="Save"/>
> > <mx:Button label="Add"/>
> > <mx:Button label="Cancel"/>
> > <mx:HSlider/>
> > </ns1:FlowBox>
> > <mx:DataGrid height="100%" width="100%" left="0">
> > <mx:columns>
> > <mx:DataGridColumn headerText="Column 1" dataField="col1"/>
> > <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
> > <mx:DataGridColumn headerText="Column 3" dataField="col3"/>
> > </mx:columns>
> > </mx:DataGrid>
> > </mx:VBox>
> >
> > and I attached the swf and here is a screen shot.
> >
> > http://www.nabble. <http://www.nabble.com/file/p23513102/ToolbarDemo.swf
> >
> > com/file/p23513102/ToolbarDemo.swf ToolbarDemo.swf
> >
> > Now note that the space between the flowbox and the grid is what I want
> to
> > eliminate.
> >
> > http://www.nabble.
> > <
> http://www.nabble.com/file/p23513102/ScreenHunter_28%2BMay.%2B12%2B17.09.jp
> > g> com/file/p23513102/ScreenHunter_28%2BMay.%2B12%2B17.09.jpg
> >
> > Tracy Spratt-2 wrote:
> >>
> >> Plain old VBox will do this for you. Set the lower grid height to 100%
> >> and
> >> it should resize dynamically to fit (If the VBox has a fixed height) If
> >> the
> >> VBox height is not set then its container will show scrollbars
> >>
> >>
> >>
> >> Tracy Spratt,
> >>
> >> Lariat Services, development services available
> >>
> >> _____
> >>
> >> From: flexcod...@yahoogro 
> >> <mailto:flexcoders%40yahoogroups.com<flexcoders%2540yahoogroups.com>>
> ups.com
> > [mailto:flexcod...@yahoogro 
> > <mailto:flexcoders%40yahoogroups.com<flexcoders%2540yahoogroups.com>>
> ups.com]
> > On
> >> Behalf Of Mike Oliver
> >> Sent: Tuesday, May 12, 2009 12:55 PM
> >> To: flexcod...@yahoogro 
> >> <mailto:flexcoders%40yahoogroups.com<flexcoders%2540yahoogroups.com>>
> ups.com
>
> >> Subject: [flexcoders] FlowBox Nesting
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> I am trying to create a screen with a grid and a toolbar on top of it.
> >>
> >> The problem is that the toolbar can have more user selectable controls
> in
> >> it
> >> than will fit on small screens.
> >>
> >> So I wanted to use the FlowBox and that works great but only if I allow
> >> for
> >> the space between the Flowbox and the grid control under it.
> >>
> >> I wanted the grid control to float under the toolbar and if the toolbar
> /
> >> flowbox gets reduced in width to wrap a control down into a second row
> >> the
> >> grid would slide down to accommodate.
> >>
> >> So I thought a flowbox with a flowbox and the grid control in it but the
> >> nested flowbox and grid won't fill the parent flow box with width="100%"
>
> >>
> >> I have tried TileList and VBox and have yet to find the combination that
> >> will allow the grid to float under the FlowBox.
> >> --
> >> View this message in context: http://www.nabble.
> >> <http://www.nabble.
> > <http://www.nabble.com/FlowBox-Nesting-tp23506408p23506408.html>
> > com/FlowBox-Nesting-tp23506408p23506408.html>
> >> com/FlowBox-Nesting-tp23506408p23506408.html
> >> Sent from the FlexCoders mailing list archive at Nabble.com.
> >>
> >>
> >>
> >>
> >>
> >
> > --
> > View this message in context: http://www.nabble.
> > <http://www.nabble.com/FlowBox-Nesting-tp23506408p23513102.html>
> > com/FlowBox-Nesting-tp23506408p23513102.html
> > Sent from the FlexCoders mailing list archive at Nabble.com.
> >
> >
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/FlowBox-Nesting-tp23506408p23513630.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
>
>  
>

Reply via email to