qx.ui.table.Table, qx.ui.table.model.Simple column width

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

qx.ui.table.Table, qx.ui.table.model.Simple column width

Peter Caffin
Hi guys,

Hopefully a simple one.

I'm building a table with the following:

        AModel = new qx.ui.table.model.Simple();
        AModel.setColumns(["Method","Company","Info"]);
        A = new qx.ui.table.Table(T1231Model);
        myframe.add(A,{row:1,column:0,rowSpan:20});
        A.set({height:200});
        A.setStatusBarVisible(false);

The result is three columns of equal default width. I'd like the widths
of the three columns to be set to different values, so the user doesn't
have to manually drag them to the right size.

I can't see anything in the doco. How do I do that?

Thanks.

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.table.Table, qx.ui.table.model.Simple column width

Derrell Lipman
Hi Peter. The secret is to use the Resize table column model instead of the default, Basic table column model. See the example in the following link:


Cheers,

Derrell


On Tue, Jul 12, 2016 at 4:25 AM Peter Caffin <[hidden email]> wrote:
Hi guys,

Hopefully a simple one.

I'm building a table with the following:

        AModel = new qx.ui.table.model.Simple();
        AModel.setColumns(["Method","Company","Info"]);
        A = new qx.ui.table.Table(T1231Model);
        myframe.add(A,{row:1,column:0,rowSpan:20});
        A.set({height:200});
        A.setStatusBarVisible(false);

The result is three columns of equal default width. I'd like the widths
of the three columns to be set to different values, so the user doesn't
have to manually drag them to the right size.

I can't see anything in the doco. How do I do that?

Thanks.

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.table.Table, qx.ui.table.model.Simple column width

Peter Caffin

Hi Derrell,


Thanks for that. It worked! For anyone reading this thread in the future through Google...


T0001Model = new qx.ui.table.model.Simple();
T0001Model.setColumns(["Title","Created","Last modified"]);
T0001Model.setData([
["Systems Administrator", "2015-01-01 10:10:02", "2015-09-01 10:10:02"],
["Network Administrator", "2015-02-01 10:10:02", "2015-09-01 10:10:02"],
["Devops", "2015-03-01 10:10:02", "2015-09-01 10:10:02"]
]); // EXAMPLE DATA
T0001 = new qx.ui.table.Table(T0001Model, {tableColumnModel:function(T0001) {return new qx.ui.table.columnmodel.Resize(T0001);}});
b0001.add(T0001,{row:1,column:0,rowSpan:20});

var tcm = T0001.getTableColumnModel();
tcm.getBehavior().setWidth(0,250);
tcm.getBehavior().setWidth(1,140);
tcm.getBehavior().setWidth(2,140);


On 12/07/2016 11:04 PM, Derrell Lipman wrote:
Hi Peter. The secret is to use the Resize table column model instead of the default, Basic table column model. See the example in the following link:


Cheers,

Derrell


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel