On Tue, Jan 6, 2009 at 5:24 PM, Mr. Hericus <m...@hericus.com> wrote:

> Hi All,
>
> In a typical form, we layout widgets line by line using a parent VBox
> composite holding a series of lines which are HBox composites.  Usually
> each line as 4 components (label, field, label, field).  The labels are
> fixed in size, and the fields are set to {flex: 1} so that everything
> will line up, but also stretch dynamically as the window or form is
> re-sized. (code is below)
>
> With 0.7 when a ComboBox and a TextField were on the same line, there
> was no problems.  The flex sizing evaluated both equally and gave each
> field the same size.  However, with 0.8.1, this is not the case.  The
> ComboBox has extra size compared to the TextField, and as a result, the
> fields get shifted around.
>
> I would submit that this is a bug in the flex sizing.  The extra area
> for the ComboBox appears to be comming from the drop-down arrow and is
> added to the size of the ComboBox making it bigger than the text field.
>
> I've used the Playground application (very sweet, BTW) to work up a
> simple example of this.  If y'all agree that this is a bug, I'll go
> ahead and submit it.


Hi.  No, it's not a bug; it's just a different paradigm than was used in
0.7.  In 0.8, each widget has a preferred width.  Simple widgets (ones
without a layout), like a Label, typically have a preferred width of 100.
Compound widgets (with a layout), such as a ComboBox, have a preferred width
of the sum of the constituent part preferred widths.  The text portion of
the ComboBox has preferred width 100, and the pull-down handle has some
additional preferred width, for a total of something more than 100, thus
your widgets don't line up. You can solve your current problem by setting
the preferred width of the ComboBox objects to 100:

      l2_t1.setWidth(100);
      l2_t2.setWidth(100);
      l3_t2.setWidth(100);
      l4_t1.setWidth(100);

You could, of course, also create a subclass of ComboBox that did this for
you in its constructor.

Cheers,

Derrell
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to