On Mon, Aug 11, 2008 at 4:42 PM, Ian Monroe <[EMAIL PROTECTED]> wrote:

> On Wed, Aug 6, 2008 at 2:56 PM, Ian Monroe <[EMAIL PROTECTED]> wrote:
> >        table.set(
> >        {
> >        //  width   : "100%"
> >          height  : "100%"
> >        });
>
> It turns out that table.setHeight( "100%" ); causes the hang up.
>
> table.setHeight( "550px"); also locks up. (Though I'm not positive
> what setHeight expects, the API docs don't say).
>
> I'm guessing your not supposed to set a height with a layout, which makes
> sense.


0.8 works quite differently than 0.7 in this respect.  In 0.8, a widget has
attributes that control its size, e.g. width and height, while a layout has
attributes that control where a widget is positioned, e.g. top and left.  It
is also possible for the widget to allow the layout to control its size, for
example, by not specifying a width but configuring the layout with both a
left and right attribute.

You might do something like this:

var layout = new qx.ui.layout.HBox(5); // spacing of 5 pixels between
elements in the horizontal box layout

var o = new qx.ui.basic.Atom("hello world");
o.setWidth(200);
layout.add(o);

o = new qx.ui.basic.Atom("This is a test");
layout.add(o, { flex : 2 } ); // flex width taking up 2 times as much space
as a flex : 1

o = new qx.ui.basic.Atom("of the emergency broadcasting system");
layout.add(o, {flex : 1 } );

o = new qx.ui.core.Widget()
o.setWidth(200); // we want to leave 200 pixels of space at the right edge;
flex fields will fill from end of "hello world" atom to this widget
layout.add(o);

Once a widget has been added to a layout, the widget can choose to
reposition itself using o.setLayoutProperties()

The new sizing and layout system takes some getting used to but does seem to
work well, and the layout problems of yesteryear should finally have gone
away.

Derrell
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to