Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting RGB Scheme to ForeColor and BackColor
Message
From
21/01/2008 20:21:36
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Converting RGB Scheme to ForeColor and BackColor
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01283871
Message ID:
01283871
Views:
55
How can I convert this:
RGB(0,0,128,0,255,255)
To ForeColor and BackColor of a grid? Is the only way to parse it out, or is there something simpler?

UPDATE: Or, can I set a cell to display the 6 number RGB color?

UPDATE2: This seems to work, but I don't like it.
m.ForeColor = "RGB(" + SUBSTR(m.Color,5,AT(",",m.color,3)-5) + ")"
m.BackColor = "RGB(" + SUBSTR(m.color,AT(",",m.color,3)+1,AT(",",m.color,4)-1)
Reply
Map
View

Click here to load this message in the networking platform