Hi,

you can achieve this by removing the list's default height and setting a 
max height instead:

http://tinyurl.com/ose2nn6

Regards,
Daniel

On 09.09.2013 22:24, Linus Gasser wrote:
> Hello all,
>
> I'm trying to have the QooxDoo-List widget grow with the number of
> items, before finally adding the scroll-bar when it gets too long. In
> QooxDoo 1.5 I tried the following:
>
> var doc = this.getRoot(),
>     vbox = new qx.ui.container.Composite(new qx.ui.layout.VBox()),
>     list,
>     height="100%",
>     flex=1;
>
> doc.add( vbox, {height: height} );
>
> vbox.add( new qx.ui.basic.Label( "List:" ) );
> vbox.add( list = new qx.ui.form.List(), {flex:flex} );
>
> for ( var i = 0; i < 20; i++ ){
>     list.add(new qx.ui.form.ListItem("" + i));
>     if ( i == 10 ){
>       alert( "will grow" );
>     }
> }
>
> But it just always has the full height, which seems somewhat logical.
> Even when playing around with "height" and "flex", it never does what
> I'd like it to do. I also tried to add a "spacer", but to no avail.
>
> Trying it out in 3.0 made me wonder, because there it not even fits the
> whole height!
>
> Is there a simple way to have the list-widget grow with the number of
> items, and then finally getting a scroll-bar once it reaches full height?
>
> Thanks,
>
> Linus
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to