LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Progress bar fill color

Solved!
Go to solution

Dear All,

 

I use a progress bar in my CVI2017 project and I would like to change the default fill color to blue.

As far as I understood I have to disable the panel theme in order to make the color change effective but the fill color still remains the default (green).

Here are the relevant rows from my code:

 

ProgressBar_ConvertFromSlide (panelHandle, PANEL_PROGRESSBAR);
ProgressBar_SetAttribute (panelHandle, PANEL_PROGRESSBAR, ATTR_DISABLE_PANEL_THEME,1);
ProgressBar_SetAttribute (panelHandle, PANEL_PROGRESSBAR, ATTR_PROGRESSBAR_BAR_COLOR, VAL_BLUE);

What am I doing wrong?

 

 

0 Kudos
Message 1 of 5
(323 Views)

Hi

 

Try to disable the panel system them

SetPanelAttribute(hPanel, ATTR_CONFORM_TO_SYSTEM_THEME, 0);

 

Jan

0 Kudos
Message 2 of 5
(305 Views)

Thank you for the tip, I just tried it but it did not help.

0 Kudos
Message 3 of 5
(301 Views)
Solution
Accepted by varta

Hi

 

Use  SetCtrlAttribute (panelHandle, PANEL_PROGRESS,  ATTR_DISABLE_PANEL_THEME, 1);

 

before ProgressBar_ConvertFromSlide();

 

Jan

0 Kudos
Message 4 of 5
(283 Views)

Hi

 

It works, thank you.

0 Kudos
Message 5 of 5
(277 Views)