Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to convert rgb to 0X00bbggrr

Status
Not open for further replies.

ron9999

Programmer
Feb 14, 2003
89
AT
Hi All,
I try to change the background color of a section.
if I retrieve the color I get 15385839
this is in rgb r255 g235 b234 color 2 satiation 240
brilliancy 230
if I change the color at runtime I have to know
how to I convert this rgb to the hex code?
is there a calculator available at the net?
TIA
Ronald Weinrich
 
How are you retrieving this? How do you intend to set it?

What version of CR?

A section supports RGB directly:

if {field_name} <5000 then
color(169,0,43)
else
white

That's Crystal syntax, use RGB for Basic.

-k
 
thanks synapsevampire
I solved the problem with the section.background.color
my new problem is to find the referece out, how to change fontcolor of a fieldobj?

oAreas = oRpt.Areas()
oArea = oAreas.Item("D")
oSections = oArea.Sections()
oSelection=oSections.Item("a")
oRepObjs = oSelection.ReportObjects()

I tried
oRepObjs.Item("Faktxt1").color
or
oRepObjs.Item("Faktxt1").font.color
or
oRepObjs.Item("Faktxt1").font.backcolor

any idea ?
tia
Ron










 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top