Quantcast

Table in Window of minimal size

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Table in Window of minimal size

zaucker
Hi,

I'd like to open a qx.ui.window.Window with a vbox layout and a
qx.ui.table.Table inside, so that the table use the minimal vertical size to
show all rows of the table (and not more). I tried all kinds of combinations
of maxHeight, allowGrowY, allowShrinkY, allowStretchY on both the window and
the table and flex values on window.add(), but the table (having for example
only 4 rows) is always a lot taller than needed. See the playground example
http://bit.ly/bZd1EF

How can I achieve that?

Thanks and best regards,
Fritz

--
Oetiker+Partner AG tel: +41 62 775 9903 (direct)
Fritz Zaucker                        +41 62 775 9900 (switch board)
Aarweg 15                            +41 79 675 0630 (mobile)
CH-4600 Olten                   fax: +41 62 775 9905
Schweiz                         web: www.oetiker.ch

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table in Window of minimal size

Fabian Jakobs
Administrator
Hi Fritz,
> I'd like to open a qx.ui.window.Window with a vbox layout and a
> qx.ui.table.Table inside, so that the table use the minimal vertical size to
> show all rows of the table (and not more). I tried all kinds of combinations
> of maxHeight, allowGrowY, allowShrinkY, allowStretchY on both the window and
> the table and flex values on window.add(), but the table (having for example
> only 4 rows) is always a lot taller than needed. See the playground example
> http://bit.ly/bZd1EF
>    
The size hint of the table has a fixed height and does not take the line
height and the number of rows in the model into account. To make the
table height fit the table's contents you have to compute the best
height manually.

The preferred height could look like this:

var preferredHeight = heightOfChrome + lineHeight * model.itemCount;


I hope this helps,
Best Fabian

--
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
Telefon: +49 721 91374-6784
[hidden email]

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Loading...