Well I suggest you to fix the size of the picture, in the table view you can
decide the size of the row, if you fix it with the same value in the
imageHints then your picture will be automatically resized accordig this
size. It's what I could check for my own needs. I fixed the size of the row
for the table then fix the same size or my icons.

Hope this helps a lot

Cheers
Ericson


Tobias Koller (GERMO GmbH) wrote:
> 
> I should'nt use "auto" in the 
> 
>  
> 
> var imageHints = { imageWidth:"auto", imageHeight:"auto", top:0 };
> 
>  
> 
> "auto" works in FF but not in IE6.
> 
>  
> 
> Tobias
> 
>  
> 
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Im Auftrag von Tobias
> Koller (GERMO GmbH)
> Gesendet: Donnerstag, 1. März 2007 18:07
> An: qooxdoo Development
> Betreff: Re: [qooxdoo-devel] How to put an image into a Table?
> 
>  
> 
> Unfortunatelly it is not perfect :(
> 
> FF works fine, IE6 doesn't show the images.
> 
>  
> 
> Any ideas?
> 
>  
> 
> I call this function like this:
> 
> getTableColumnModel().setDataCellRenderer(tableModel.getColumnIndexById("Details"),
> new
> lib.ImageDataCellRenderer("iconPath/22_details.png","iconPath/22_details.png"));
> 
>  
> 
> getTableColumnModel().setDataCellRenderer(tableModel.getColumnIndexById("Dokument"),
> new
> lib.ImageDataCellRenderer("iconPath/22_pdf.png","iconPath/22_pdf.png"));
> 
>  
> 
> Here is my code:
> 
> -----------
> 
> qx.OO.defineClass("lib.ImageDataCellRenderer",
> qx.ui.table.IconDataCellRenderer,
> 
> function(imgTrue, imgFalse) {
> 
>   qx.ui.table.IconDataCellRenderer.call(this);
> 
>  
> 
>   this._iconUrlTrue  =
> qx.manager.object.AliasManager.getInstance().resolvePath(imgTrue);
> 
>   this._iconUrlFalse =
> qx.manager.object.AliasManager.getInstance().resolvePath(imgFalse);
> 
>   this._iconUrlNull  =
> qx.manager.object.AliasManager.getInstance().resolvePath("static/image/blank.gif");
> 
>  
> 
> });
> 
>  
> 
> //overridden
> 
> qx.Proto._identifyImage = function(cellInfo) {
> 
>   var IconDataCellRenderer = qx.ui.table.IconDataCellRenderer;
> 
>   var imageHints = { imageWidth:"auto", imageHeight:"auto", top:0 };
> 
>   switch (cellInfo.value) {
> 
>     case true:  imageHints.url = this._iconUrlTrue;  break;
> 
>     case false: imageHints.url = this._iconUrlFalse; break;
> 
>    // default:    imageHints.url = this._iconUrlNull;  break;
> 
>     default:    imageHints.url = this._iconUrlTrue;  break;
> 
>   }
> 
>   return imageHints;
> 
> }
> 
> -----------
> 
>  
> 
>  
> 
> Any ideas?
> 
>  
> 
> thanks
> 
>  
> 
> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Im Auftrag von Tobias
> Koller (GERMO GmbH)
> Gesendet: Donnerstag, 1. März 2007 13:57
> An: qooxdoo Development
> Betreff: Re: [qooxdoo-devel] How to put an image into a Table?
> 
>  
> 
> Thank you!
> 
> Thats perfect ;)
> 
>  
> 
> -----Ursprüngliche Nachricht-----
> 
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Im Auftrag von
> ericson
> 
> Gesendet: Donnerstag, 1. März 2007 12:55
> 
> An: [email protected]
> 
> Betreff: Re: [qooxdoo-devel] How to put an image into a Table?
> 
>  
> 
>  
> 
> Well the best way seems to define your own class, you can have a look at
> the
> 
> source code of BooleanDataCellRenderer.js
> 
>  
> 
> You can create the same way your ImageDataCellRenderer ...
> 
>  
> 
> Cheers
> 
> Ericson
> 
>  
> 
>  
> 
> Hugh Gibson wrote:
> 
>> 
> 
>>> The only thing I found is : IconDataCellRenderer but how can I define
> 
>>> the icon for this cell?
> 
>> 
> 
>> Check out the documentation for IconDataCellRenderer._identifyImage. You
> 
>> derive a class from IconDataCellRenderer and override _identifyImage,
> 
>> returning the image details as defined.
> 
>> 
> 
>> For example, we use:
> 
>> 
> 
>> qx.Proto._identifyImage = function(cellInfo) 
> 
>>    {
> 
>>    return {"url" : cellInfo.value,
> 
>>            "imageWidth" : 16,
> 
>>            "imageHeight" : 16,
> 
>>            "tooltip" : "Read status"};
> 
>>    };
> 
>> 
> 
>> The cellInfo is set up via the normal cell data definition.
> 
>>    
> 
>> Hugh
> 
>> 
> 
>> -------------------------------------------------------------------------
> 
>> Take Surveys. Earn Cash. Influence the Future of IT
> 
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
> 
>> your
> 
>> opinions on IT & business topics through brief surveys-and earn cash
> 
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> 
>> _______________________________________________
> 
>> qooxdoo-devel mailing list
> 
>> [email protected]
> 
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
>> 
> 
>> 
> 
>  
> 
> -- 
> 
> View this message in context:
> http://www.nabble.com/How-to-put-an-image-into-a-Table--tf3325387.html#a9248277
> 
> Sent from the qooxdoo-devel mailing list archive at Nabble.com.
> 
>  
> 
>  
> 
> -------------------------------------------------------------------------
> 
> Take Surveys. Earn Cash. Influence the Future of IT
> 
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> 
> opinions on IT & business topics through brief surveys-and earn cash
> 
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> 
> _______________________________________________
> 
> qooxdoo-devel mailing list
> 
> [email protected]
> 
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
>  
> 
> -------------------------------------------------------------------------
> 
> Take Surveys. Earn Cash. Influence the Future of IT
> 
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> 
> opinions on IT & business topics through brief surveys-and earn cash
> 
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> 
> _______________________________________________
> 
> qooxdoo-devel mailing list
> 
> [email protected]
> 
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-put-an-image-into-a-Table--tf3325387.html#a9256228
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to