TextColor function in calculation problem

View: New views
3 Messages — Rating Filter:   Alert me  

TextColor function in calculation problem

by Tjebbe van Tijen via Chello :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

TextColor("Plaid";RGB(255;0;0)) returns the word Plaid in red.

says the manual

works fine, BUT NOT when I use the RGB argument in a calculation

my variable is stored in a global text field  gColor

the user can choose from a  list with colors (in a separate table)

the content of the field that is stored in gColor = formatted as the  
manual says RGB(255;0;0)

but for some odd reason this fails to work ... I give up...

so I have a text field called xText

and try to change the value of the field by using this calculation:

TextColor(xText; gColor)

It simply does NOT work

I can not understand why (even tried GetField argument, justr in  
case, no good result)

I need this for generating columns in a graph with lines that cahnge  
color at certain stages of a looping routine

Antbody  knowing what to do?

_______________________________________________
The Troi plug-list mailing list
plug-list@...
http://mail.troi.com/mailman/listinfo/plug-list_troi.com

Re: TextColor function in calculation problem

by Rob Russell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 23/8/08 at 9:43 AM, t.tijen@... (Tjebbe van Tijen via
Chello) wrote:

>the content of the field that is stored in gColor = formatted
>as the  manual says RGB(255;0;0)

RGB(255;0;0) = 16711680

So you should have 16711680 in gColor, not the formula.

>but for some odd reason this fails to work ... I give up...
>
>so I have a text field called xText
>
>and try to change the value of the field by using this calculation:
>
>TextColor(xText; gColor)

If you store the formula RGB(255;0;0) in the field, then this
should work

     TextColor(xText; evaluate ( gColor ) )

r


_______________________________________________
The Troi plug-list mailing list
plug-list@...
http://mail.troi.com/mailman/listinfo/plug-list_troi.com

Re: TextColor function in calculation problem

by Tjebbe van Tijen via Chello :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks a lot Rob Russell

I never used that function (as I deal mainly with text)
now this will help me to generate visuals from a series of databases  
full of bad historical data (doing an overview of the violnet history  
of Colombia); this tiny trick lets me build up my bar statistic  
showing the wide variation in estimated numbers using changing colors...

nice greetings

tjebbe

On 24-aug-2008, at 0:01, Rob Russell wrote:

On 23/8/08 at 9:43 AM, t.tijen@... (Tjebbe van Tijen via
Chello) wrote:

> the content of the field that is stored in gColor = formatted
> as the  manual says RGB(255;0;0)

RGB(255;0;0) = 16711680

So you should have 16711680 in gColor, not the formula.

> but for some odd reason this fails to work ... I give up...
>
> so I have a text field called xText
>
> and try to change the value of the field by using this calculation:
>
> TextColor(xText; gColor)

If you store the formula RGB(255;0;0) in the field, then this
should work

      TextColor(xText; evaluate ( gColor ) )

r


_______________________________________________
The Troi plug-list mailing list
plug-list@...
http://mail.troi.com/mailman/listinfo/plug-list_troi.com


_______________________________________________
The Troi plug-list mailing list
plug-list@...
http://mail.troi.com/mailman/listinfo/plug-list_troi.com
LightInTheBox - Buy quality products at wholesale price!