Changing colour of a string with a table

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing colour of a string with a table

Joachim Baran
Hi!

  Is it possible to change the colour for certain strings in a table?
Would I need to write my own cell-renderer, or is there a simple
solution to this problem?

Thanks,
Joachim

------------------------------------------------------------------------------
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware,
phishing sites, and compromised hosts - saving your company time,
money, and embarrassment.   Learn More!
http://p.sf.net/sfu/hpdev2dev-nov
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Changing colour of a string with a table

Mustafa Sak-3
Cell Renderer is good idea!

May be its helpful:

qx.Class.define("asa.MyCellRenderer",
{
  extend : qx.ui.table.cellrenderer.Default,
  construct : function()
  {
        this.base(arguments);
  },  
  members :
  {
    _getCellStyle : function(cellInfo)
    {
                if (cellInfo.rowData == null)
                {
                        return;
                }
                /*switch (cellInfo.rowData.cty_type)
                {
                        case "privat":
                                var color ="red";
                                break;
                        default:
                                var color = "yellow";
                                break;
                }*/
      return this.base(arguments, cellInfo) + "background-color:" +
cellInfo.rowData.cty_colorcode + ";color:" + cellInfo.rowData.cty_colorcode
+ ";";
    }
  }
});

Regards Sak

 

SAKsystems

Inh. Mustafa Sak

Varrelmannstr. 16

30453 Hannover

Tel.   +49 511 / 165 969 40

Fax   +49 511 / 165 969 49

Mobil +49 163 / 312 6144

http://www.saksys.de

[hidden email]

STEUER-Nr. 2613817458

 

-----Urspr√ľngliche Nachricht-----
Von: Joachim Baran [mailto:[hidden email]]
Gesendet: Mittwoch, 3. November 2010 15:57
An: qooxdoo Development
Betreff: [qooxdoo-devel] Changing colour of a string with a table

Hi!

  Is it possible to change the colour for certain strings in a table?
Would I need to write my own cell-renderer, or is there a simple
solution to this problem?

Thanks,
Joachim

----------------------------------------------------------------------------
--
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware,
phishing sites, and compromised hosts - saving your company time,
money, and embarrassment.   Learn More!
http://p.sf.net/sfu/hpdev2dev-nov
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware,
phishing sites, and compromised hosts - saving your company time,
money, and embarrassment.   Learn More!
http://p.sf.net/sfu/hpdev2dev-nov
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Mustafa Sak (sak@saksys.de).vcf (494 bytes) Download Attachment