On Sat, Jul 17, 2010 at 13:42, sid_curious <[email protected]> wrote:

>
> Hi danovics,
> I'm sorry for my late answer, I made that example using the API Help and I
> was thinking that if:
>
>
> table.getTableColumnModel().getHeaderCellRenderer(0).setToolTip("ToolTipTxt");
> set the tooltip for col 0,
>
> table.getTableColumnModel().getHeaderCellRenderer(1).setToolTip("ToolTipTxt");
> will set the tooltip for col 1.
> well, i have not read the source code, but I think that there is a bug
> regarding how tool tips are working for table headers.
>

Since header cells are almost always rendered by the same renderer class, in
fact, only one instance of the default header renderer is ever created (by
default) so retrieving the header cell renderer for column 1 does actually
retrieve the same instance that was retrieved for column 0. Setting the tool
tip for one column sets it for all columns.

To solve this, you should be able to do something like the following
untested code:

var tcm = table.getTableColumnModel();
for (var i = 0; i < numColumns; i++)
{
  tcm.setHeaderCellRenderer(i, new qx.ui.table.headerrenderer.Default());
}

Now you should have a unique header renderer for each column, and can thus
set a unique tool tip for each.

Cheers,

Derrell
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to