Hello,
I would like to be able to define the custom colours as listed in the standard windows colour picker dialog.
In windows it is fairly easily to set these
COLORREF* ccolor = GetSavedCustomColors();
for (int i=0; i < 16; i++)
{
GetRValue(ccolor);
GetGValue(ccolor);
GetBValue(ccolor);
}
Is there any way to set these in TChart? On loading my app, I read previously stored colours from the registry and apply them, but the TChart colour picker has 16 black entries instead of the default windows ones.
Many thanks,
Tony.
Custom colours (windows default).
Hi TonyVSUK,
If we understand well you have custom colors in an array or somewhere and you want to use them to change a series color (or pointer, line,... etc). If so, have you tried the RGB function? Could you please take a look at this topic where there is an example?
If we understand well you have custom colors in an array or somewhere and you want to use them to change a series color (or pointer, line,... etc). If so, have you tried the RGB function? Could you please take a look at this topic where there is an example?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
No, that is not what I want to do.
If you access the properties for a chart, select the "Panel" tab, select "Background" tab, and now click "Color". This brings up the standard windows CColorDialog window, the custom colours here can be retrieved/defined using
COLORREF* ccolor = CColorDialog::GetSavedCustomColors();
for (int i=0; i < 16; i++)
{
//to get the colours
GetRValue(ccolor);
GetGValue(ccolor);
GetBValue(ccolor);
//to set the colours
ccolor = RGB(rCol,gCol,bCol);
}
I have some GUI development software, and elsewhere the user can define their own custom colours (I save them on a project by project basis). Ideally I could set them for the TChart elements as well so a user has a fixed set of custom colours available across the whole project they are working on.
I hope this makes sense.
Tony.
If you access the properties for a chart, select the "Panel" tab, select "Background" tab, and now click "Color". This brings up the standard windows CColorDialog window, the custom colours here can be retrieved/defined using
COLORREF* ccolor = CColorDialog::GetSavedCustomColors();
for (int i=0; i < 16; i++)
{
//to get the colours
GetRValue(ccolor);
GetGValue(ccolor);
GetBValue(ccolor);
//to set the colours
ccolor = RGB(rCol,gCol,bCol);
}
I have some GUI development software, and elsewhere the user can define their own custom colours (I save them on a project by project basis). Ideally I could set them for the TChart elements as well so a user has a fixed set of custom colours available across the whole project they are working on.
I hope this makes sense.
Tony.
Hi Tony,
I understand that you would like to add your custom color to the "custom colors list" of the color dialog. I've added it to the wish list to be implemented in further releases because I'm afraid it's not possible right now (TV52014070).
I understand that you would like to add your custom color to the "custom colors list" of the color dialog. I've added it to the wish list to be implemented in further releases because I'm afraid it's not possible right now (TV52014070).
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |