On Fri, Sep 4, 2009 at 09:43, skar <[email protected]> wrote:

> Hi,
>
> I've got a table column for which I want to display an atom with a text
> and an icon. The icon image depends on the text value. How do I do it?
> Using the conditional renderer, I could change the text color, alignment
> etc, but don't know how to add an icon.
>
>
This should be a very simple modification to
qx.ui.table.cellrenderer.Boolean, which extends
qx.ui.table.cellrenderer.AbstractImage. Your cell renderer would extend
AbstractImage just as Boolean does, and implement an _identifyImage() method
that selects the correct image based on the string found in the data model.
Then, in addition to what Boolean does, you'd implement a modified
_getContentHtml() method (from AbstractImage) that displays both the image
and the text.

Derrell
------------------------------------------------------------------------------
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