The problem is table height = 1*, not the resize table model. Try using 100%
Joe Hudson-2 wrote: > > qx.Proto.main = function(e) > { > var d = qx.ui.core.ClientDocument.getInstance(); > > var tf1 = new qx.ui.pageview.tabview.TabView; > d.add(tf1); > tf1.set({ left: 20, top: 20, right: 20, maxWidth: 1000, minWidth: 800, > bottom: 20 }); > > var t1_1 = new qx.ui.pageview.tabview.Button("Tab 1"); > var t1_2 = new qx.ui.pageview.tabview.Button("Tab 2"); > t1_1.setChecked(true); > tf1.getBar().add(t1_1, t1_2); > > var p1_1 = new qx.ui.pageview.tabview.Page(t1_1); > var p1_2 = new qx.ui.pageview.tabview.Page(t1_2); > > tf1.getPane().add(p1_1, p1_2); > > > > var nextId = 0; > var createRandomRows = function(rowCount) { > var rowData = []; > var now = new Date().getTime(); > var dateRange = 400 * 24 * 60 * 60 * 1000; // 400 days > for (var row = 0; row < rowCount; row++) { > var date = new Date(now + Math.random() * dateRange - dateRange / > 2); > rowData.push([ nextId++, Math.random() * 10000, date, > (Math.random() >> 0.5) ]); > } > return rowData; > }; > > // Create the initial data > var rowData = createRandomRows(50); > > // Add some encoding relevant stuff > rowData[15][1] = "A html & entities escaping test"; > > // table model > var tableModel = new qx.ui.table.SimpleTableModel(); > tableModel.setColumns([ "ID", "A number", "A date", "Boolean test" ]); > tableModel.setData(rowData); > tableModel.setColumnEditable(1, true); > tableModel.setColumnEditable(2, true); > > // table > var table = new qx.ui.table.Table(tableModel); > with (table) { > set({ width:"100%", height:"1*", > border:qx.renderer.border.BorderPresets.getInstance().thinInset }); > > getSelectionModel().setSelectionMode(qx.ui.table.SelectionModel.MULTIPLE_INT > ERVAL_SELECTION); > > // Use a table column model that resizes columns by a specified > behavior. > var rtcm = new qx.ui.table.ResizeTableColumnModel(); > > // The table column model MUST be set for the table before > specifying > // the resize behavior. > setTableColumnModel(rtcm); > > // > // Specify the resize behavior... > // > > // Obtain a behavior object to manipulate > var resizeBehavior = rtcm.getBehavior(); > > // This uses the set() method to set all attriutes at once; uses > flex > resizeBehavior.set(0, { width:"1*", minWidth:40, maxWidth:80 }); > > // We could also set them individually: > resizeBehavior.setWidth(1, "50%"); > resizeBehavior.setMinWidth(1, 100); > resizeBehavior.setMaxWidth(1, 320); > > // The default is { width:"1*" } so this one is not necessary: > // resizeBehavior.set(2, { width:"1*" }); > > // Set one fixed width column > resizeBehavior.set(3, { width:100 }); > > // Display a checkbox in column 3 > rtcm.setDataCellRenderer(3, new > qx.ui.table.BooleanDataCellRenderer()); > }; > p1_1.add(table); > > }; > > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Tuesday, March 27, 2007 9:57 AM > To: qooxdoo Development > Subject: Re: [qooxdoo-devel] arerelative column widths in a table > possible? > > [EMAIL PROTECTED] writes: > >> "Joe Hudson" <[EMAIL PROTECTED]> writes: >> >>> So, I see that I can set absolute column widths like: >>> >>> var table = new qx.ui.table.Table(tableModel); >>> with (table) { >>> set ({ left: 10, right: 10}); >>> getTableColumnModel().setColumnWidth(0, 30); >>> } >>> >>> But, is there any way to set them as a percentage of the whole table > width? >>> The reason I ask is since Im setting the right property as opposed to > the >>> width property, I dont actually know how wide the table will be. >>> Thanks. >> >> Iif you pass an integer, it's a number of pixels. You can als pass a > string. >> To use percentages: >> >> setColumnWidth(0, "50%") >> >> It's also well worth your time to learn about flex widths, which, if you > have >> any fix-width columns in your table, are likely far more appropriate >> since >> they fill available space: >> >> setColumnWidth(0, "1*"); >> >> There a page describing flex widths on the web site. A quick search > should >> turn it up. > > Sorry, I wrote this pre-caffeine. I believe that widths other than pixel > widths don't work with the standard TableColumnModel. You'll probably > want > to > look at the ResizeTableColumnModel which handles all of the width > variations. > Look at example Table_1.html which makes use of the > ResizeTableColumnModel. > > Cheers, > > Derrell > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.446 / Virus Database: 268.18.18/734 - Release Date: 3/26/2007 > 2:31 PM > > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.446 / Virus Database: 268.18.18/734 - Release Date: 3/26/2007 > 2:31 PM > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > qooxdoo-devel mailing list > qooxdoo-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > -- View this message in context: http://www.nabble.com/arerelative-column-widths-in-a-table-possible--tf3472837.html#a9694826 Sent from the qooxdoo-devel mailing list archive at Nabble.com. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel