on 07-24-2008 2:05 PM
Hi,
I've some difficulties to set the color of a matrix column.
I've tried to convert to integer an hexa color code (like #FF0000)
or using System.Drawing.Color.MyColor.ToArgb()
In both case the color of the column doesn't match the color I specify.
For example using LightSkyBlue give me an orange column.
Thanks for your help.
The color is based in RGB representation (red - green - blue). Each part of rgb is in range 0 - 255. For example full red color is 255 - 0 - 0 and this values converted in hexa is FF0000 and this hexa value you must convert back to decimal.
From UI help:
RGB value in long representation. You can use the standard Visual Basic colors, for example, vbBlue, vbYellow, etc.
The valid range for a normal RGB color is 0 to 16,777,215 (&HFFFFFF).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I totaly forgot how I made it in the past in non sap forms. There is calculation as
Private Sub Command1_Click()
r = Val(InputBox$("Red Value"))
B = Val(InputBox$("Blue Value"))
G = Val(InputBox$("Green Value"))
*Lng$ = B * 65536 + G * 256 + r*
MsgBox Lng$
End Sub
there is no conversion to hex, just multiplication.
Edited by: Petr Verner on Jul 24, 2008 3:50 PM
Hi. Perhaps why does SAP use colours set up by the menu Window's> Color.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.