On Sat, Sep 5, 2009 at 8:17 PM, Derrell Lipman <
[email protected]> wrote:

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

Thanks Derrell and Vincent. I've got it working now :)

I'm using some images in the Tango theme. Let's see
icon/22/actions/go-first.png and icon/22/actions/go-last.png are the images
in question. If I give the path as "qx/icon/Tango/22/actions/go-first.png",
then qx.util.ResourceManager.getInstance().getHeight(iconpath) gives me the
correct height. Same with the width. How do I use the
"icon/22/actions/go-first.png" part alone and get qx to find the theme
specific path for me?

Also, the image URL sent to the server is
"/qx/icon/Tango/22/actions/go-first.png" instead of the whole path which is
something else, like "/qooxdoo_trunk/qx/icon/Tango/22/actions/go-first.png".
How does the image, atom widgets translate the string
"icon/22/actions/go-first.png" to the correct URL on the server?

As of now, I'm storing the server side image URL
"/qooxdoo_trunk/qx/icon/Tango/22/actions/go-first.png" and the theme
specific URL "qx/icon/Tango/22/actions/go-first.png" in the icon hash and it
works. But it should be possible to use just the
string "icon/22/actions/go-first.png" and get the other 2 URLs, isn't it?

cheers,
skar.
------------------------------------------------------------------------------
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