Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hello,
I am using the Pro/Toolkit and I would like to change the background color in ProE 5.0. How can I do this? I don't see the right function to do this?
I only saw ProColormapAlternateschemeSet() but I can't set every color I would like.
Thank you very much
Emilie
Solved! Go to Solution.
I forgot to post the solution I found :
ProError err = PRO_TK_NO_ERROR;
char* p_option = "system_background_color";
ProName w_option;
ProName w_option_value;
char* color = "0 100 0"; //set here the color
ProStringToWstring(w_option_value, color);
ProStringToWstring(w_option, p_option);
err = ProConfigoptSet( w_option, w_option_value );
I tried also :
ProColor old_g_color;
ProColor background;
background.method = PRO_COLOR_METHOD_RGB;
background.value.type = PRO_COLOR_BACKGROUND;
background.value.map.red = 1;
background.value.map.green = 0;
background.value.map.blue = 0;
ProGraphicsColorModify(&background, &old_g_color);
ProWindowRefresh (-1);
but it is not working... 😞
I also tried
ProColormap colors;
colors.red = 0;
colors.green = 0;
colors.blue = 1;
ProColormapSet(PRO_COLOR_BACKGROUND, &colors);
ProWindowRefresh (-1);
This last try seems to change the color when I go to View/Display Settings/System Colors. I can see that the color assigned to background changed but it is not really changing the background color...
Please help!
Emilie
Please, help!
Thank you
Emilie
I forgot to post the solution I found :
ProError err = PRO_TK_NO_ERROR;
char* p_option = "system_background_color";
ProName w_option;
ProName w_option_value;
char* color = "0 100 0"; //set here the color
ProStringToWstring(w_option_value, color);
ProStringToWstring(w_option, p_option);
err = ProConfigoptSet( w_option, w_option_value );