Hi Ludger,

On Thursday 05 March 2009 ludger wrote:
> thank you for message.Unfortunately I received an errormessage.
> G.getBehavior is not a function
> I work with verson 0.81
> here is a part of my programm.
> var tabellenmodel = new qx.ui.table.model.Simple();
> tabellenmodel.setColumns(["Nr.","Nachname","Vorname","Geburtsdatum"]);
> var tabelle = new qx.ui.table.Table (tabellenmodel);
> var tcm = tabelle.getTableColumnModel();
>
> // Obtain the behavior object to manipulate
> var resizeBehavior = tcm.getBehavior();
>
> // This uses the set() method to set all attriutes at once; uses flex
> resizeBehavior.set(0, { width:"1*", minWidth:40, maxWidth:80 });
>
>  >var resizeBehavior = tcm.getBehavior();
>
> when I use getBehavoir I get the errormessage
> G.getBehavior is not a function
The problem here is that the "behaviour" property is only available if you use 
a so-called "Resize column model". To change the default "basic" column model 
to a resize one:

--snip--
tabelle.setColumnModel(new qx.ui.table.columnmodel.Resize());
--snip--

Right after you created your table widget. This way you can modify the 
"resizeBehaviour".

> I want to define a complete table not separate colums
> var table=width100% I normally write in html
> to receive on the browser page filled completely with the table
Setup an coomposite container (the general container in qooxdoo) and add it to 
the application root and setup the table widget with the flex layout property.

--snip--
// HBox layout as sample
var container = new qx.ui.container.Composite(new qx.ui.layout.HBox);
this.getRoot().add(container, {left:0, right:0, top:0, bottom:0});

// table code
container.add(tabelle, {flex:1});
--snip--

The layout properties are well documented at the qooxdoo wiki.
-> http://qooxdoo.org/documentation/0.8/ui_layouting#flex

cheers,
  Alex

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to