Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsDynamic coloring a result
https://www.eclipse.org/forums/index.php/mv/msg/351409/871200/#msg_871200
I have a xml file which contains in one of its parameters an item and a color value in hexadecimal format.
And I want to List the items, but I would like that the font color of each item was the color of the value which results in color colum.
I retrive the columns ItemName and ItemColor (OK), and i want to generate the following output:
Items List
Name Other item properties
myitemNameA
myitemNameB
But i can't find hoe to place an expression in the color font.
Is it possible to do this? I could use styles however I had to create a style for each possible colors (it wold take me some hours,lol)
Is there any solution out there?
]]>Filipe Apóstolo2012-05-11T12:04:07-00:00Re: Dynamic coloring a result
https://www.eclipse.org/forums/index.php/mv/msg/351409/871269/#msg_871269
//get the column binding for the font color
var fc = this.getRowData().getColumnValue("FontColor");
this.getStyle().color= fc;
Jason
On 5/11/2012 8:04 AM, Filipe Apóstolo wrote:
> Hello,
>
> I have a xml file which contains in one of its parameters an item and a
> color value in hexadecimal format.
>
> And I want to List the items, but I would like that the font color of
> each item was the color of the value which results in color colum.
>
> Example:
> ....
> <myitem color= "#0080ff"> myitemNameA </myitem>
> <myitem color= "#990000"> myitemNameB </myitem>
>
> I retrive the columns ItemName and ItemColor (OK), and i want to
> generate the following output: Items List
> Name Other item properties
> myitemNameA
> myitemNameB
>
> But i can't find hoe to place an expression in the color font.
>
> Is it possible to do this? I could use styles however I had to create a
> style for each possible colors (it wold take me some hours,lol)
>
> Is there any solution out there?
>]]>Jason Weathersby2012-05-11T17:26:32-00:00