Print Page | Close Window

[Solved]Hex color

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=17497
Printed Date: 01 July 2025 at 1:20pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [Solved]Hex color
Posted By: mar72vin
Subject: [Solved]Hex color
Date Posted: 27 October 2010 at 11:03pm
Hi,
I am trying to set the report controls HighlightBackColor to orange using

control.PaintManager.HighlightBackColor = 0xFFA500

When testing this out the hightlight color shows blue not orange... am I missing something?

thanks!


-------------
Product: Xtreme Report Control (ActiveX) version 15.1.3
Platform: Windows 7 (64bit)
Language: c#



Replies:
Posted By: Aaron
Date Posted: 18 November 2010 at 2:10am
Hi,
 
You didn't miss anything... It's showing blue indeed.
Strange though, when using value (converted) hex to RGB it shows orange:  RGB(255,165,0) 
 
Maybe CJ support can enlighten us Wink
 
Thanks
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: JantjeKeizer
Date Posted: 18 November 2010 at 5:35am
in long notation it's always BGR


Posted By: Aaron
Date Posted: 18 November 2010 at 10:21am
Originally posted by JantjeKeizer JantjeKeizer wrote:

in long notation it's always BGR
Hi,
 
Does it also mean that all values have to be reversed? I only could get orange with &H5AFF  
 
Like this: 
FF A5 00    >>     00 5A FF
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: mar72vin
Date Posted: 18 November 2010 at 7:11pm
Thanks Aaron and Jantje.

This works for me. ".PaintManager.HighlightBackColor = 0x00A5FF;"

I didn't need to reverse each value, just switch them to suit BGR. Seems a bit backwards but at least it works!Smile

-------------
Product: Xtreme Report Control (ActiveX) version 15.1.3
Platform: Windows 7 (64bit)
Language: c#


Posted By: Baldur
Date Posted: 10 December 2010 at 3:42am
The function RGB converts the color to OLE_COLOR, this is really BGR in Hex.
Other languages works with native RGB-hexvalues (like htm), for normal windowscontrols you have to convert to OLE_COLOR.
This is not a problem of CJ, this is default for Windows.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net