Grid Line Color Change |
Post Reply |
Author | |
Krenshau
Groupie Joined: 15 October 2005 Location: United States Status: Offline Points: 49 |
Post Options
Thanks(0)
Posted: 22 June 2007 at 4:42pm |
Hello, I am trying to figure out how to change the grid line color. I see the ReportControl.PaintManager.GridLineColor = , but I am having trouble figuring out the uint. I checked the demo, but I didn't see it in there. Am I going about this the right way? I am using VS2005 C#. Thank you for your help. |
|
Ben
QAS Information Systems |
|
apuhjee
Senior Member Joined: 02 September 2005 Location: United States Status: Offline Points: 130 |
Post Options
Thanks(0)
|
Mike sent me this VB.NET code a while back. Not really the right language or direction you're trying to go... but it might give you a place to start :)
Cheers ~ jp
Public Shared Function ColorFromUInt32(ByVal u32Color As UInt32) As Color Dim iByte As Integer Dim newRGB As Byte Dim iR As Byte Dim iG As Byte Dim iB As Byte Dim iRGB As Integer iByte = 0 newRGB = 0 For iRGB = 0 To 16 Step 8 For iByte = iRGB To iRGB + 7 If (Convert.ToInt32(u32Color) And (2 ^ iByte)) = (2 ^ iByte) Then newRGB = newRGB Or (2 ^ (iByte - iRGB)) End If Next If (iRGB = 0) Then iR = newRGB ElseIf (iRGB = 8) Then iG = newRGB ElseIf (iRGB = 16) Then iB = newRGB End If newRGB = 0 Next Return Color.FromArgb(iR, iG, iB) End Function |
|
Krenshau
Groupie Joined: 15 October 2005 Location: United States Status: Offline Points: 49 |
Post Options
Thanks(0)
|
Thank you for that information. I made this code:
RegReport.PaintManager.GridLineColor = Convert.ToUInt32("1524");
and it turned the lines red. I am not quite getting how to find the correct number for the color I want, which is blue.
If anyone can point me to any articles that would describe this, I would be grateful.
|
|
Ben
QAS Information Systems |
|
Krenshau
Groupie Joined: 15 October 2005 Location: United States Status: Offline Points: 49 |
Post Options
Thanks(0)
|
anyone? at least how to turn the line blue?
I tried this:
RegReport.PaintManager.GridLineColor = Convert.ToUInt32("6085FF", 16); because I thought it would convert the hex color to uint, but it is just redish. If anyone could set me straight on this, I would be very grateful.
Thank you.
|
|
Ben
QAS Information Systems |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
wndReportControl.PaintManager.GridLineColor = ( uint)Color.FromArgb(0x60, 0x85, 0xFF).ToArgb();or just
wndReportControl.PaintManager.GridLineColor = 0xFF8560;
you need switch R and B - its math.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Krenshau
Groupie Joined: 15 October 2005 Location: United States Status: Offline Points: 49 |
Post Options
Thanks(0)
|
Math, crap. That's not something I am great at. Thanks for the code. I understand it, now. Thank you.
|
|
Ben
QAS Information Systems |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |