Hello Daniel,

yes, it is possible to add linebreaks to header cells, but it is  
complicated and you might have to create a larger background image for  
header cells.

You have to create a new class and extend  
qx.ui.table.headerrenderer.HeaderCell. Override  
_createChildControlImpl():
_createChildControlImpl : function(id)
{
   var control;

   switch(id)
   {
     case "label":
       control = new qx.ui.basic.Label(this.getLabel()).set({
         anonymous: true,
         rich : true,
         allowShrinkX: true
       });

       this._add(control, {row: 0, column: 1});
       break;
   }

   return control || this.base(arguments, id);
}


You can now use HTML for your header.

var tableModel = this._tableModel = new qx.ui.table.model.Simple();
tableModel.setColumns([ "ID", "foo<br>bar", "A date", "Boolean" ]);

Then you have to adjust the height of you qx.ui.table.pane.Header so  
that it can contain the larger header cell.


If you want this feature in future versions of qooxdoo, feel free to  
create an issue and mark it as enhencement in our Bugzilla: 
http://bugzilla.qooxdoo.org/

Cheers,
Jonathan


On 30.07.2009, at 15:14, Daniel Hirtzbruch wrote:

> Hello,
>
> I got another question. I constructed a table using  
> qx.ui.table.model.Simple(). The cell content is quite narrow,  but  
> the header content is quite wide. Is there a possibility to add  
> linebreaks / auto enlargement to the header cells - didn't find  
> anything in the docs / examples.
>
> Regarding the partition of my app I'll tell about my results later  
> when I'm done with it or when I occure further questions.
>
> TIA, Daniel

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to