Turned out to be much easier then you described. I was able to add one small
piece of code to the code that prepares the style for each row. It was
basically just like how I patched it before except this patch is actually
smaller! I changed this line in pane.js:

rowStyle+=";position:relative;height:"+rowHeight+"px;
width:"+paneModel.getTotalWidth()+"px;";

to this:

rowStyle+=";position:relative;color:"+
tableModel.getColors(row)+";height:"+rowHeight+"px;
width:"+paneModel.getTotalWidth()+"px;";


and it works like a champ! (the tableModel.getColors(row) was the property I
added with my mixin).

So I guess when I get a solution to the column header height, I will be able
to use 0.7.3, I can't wait!

Thanks everyone.

Jim


On Jan 31, 2008 7:52 AM, Helder Magalhães <[EMAIL PROTECTED]>
wrote:

>
> @Jim Using a custom row renderer seems exactly want you need!
> 1. Create a new class, which extends "qx.ui.table.rowrenderer.Default";
> 2. Perform tweaks in the constructor, if required
>  2.1. For example, to use a theme color for even rows:
> qx.theme.manager.Color.getInstance().connect(this._styleBgcolEven, this,
> "myCustomEvenColor");
> 3. Implement required methods. These are the key methods, where you may
> access current row data (through "rowInfo.rowData") and use it to
> conditionally pick a different row color.
>  3.1. "updateDataRowElement"
>  3.2. "createRowStyle" (similar to "updateDataRowElement" but more
> CSS-based)
> NOTE: This tutorial is for 0.7.2+ framework version ("createRowStyle"
> wasn't
> previously required, for example).
>
>
>
> Sebastian Werner wrote:
> >
> > I don't know how you have done this before, as in my opinion it was
> > only possible to switch the colors of all rows for one table instance
> > and not just a few. I would say that your request should be solvable
> > using a custom row renderer.
> >
> Not all colors need to be customized. A powerful (and working) approach is
> to perform color customization for a subset of displayed rows and leave
> the
> remaining rows' formatting to be handled by the superclass (using
> this.base). :-)
>
>
> I may try to put together a working sample if anyone is interested. Maybe
> a
> DemoBrowser-like HTML file will be the best format, but I'm opened to
> suggestions.
>
>  Helder Magalhães
> --
> View this message in context:
> http://www.nabble.com/Table-Row-Colors-tp15191734p15206619.html
> Sent from the qooxdoo-devel mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to