Progress bar setColour


25-05-2011 06:12:55


I'm trying to perform a setColour on a progress widget. The progress bar widget 'container' changes colour, but not the inner progress bar (that changes with % complete).
I see the widget contains another widget called mClient which cannot be accessed outside of the class- so I cannot directly apply the colour change to it.

I have tried the following methods to affect the mClient widget:


const int children = mHealthBar->getChildCount();
for(int i=0;i<children;++i) mHealthBar->getChildAt(i)->setColour(colour);

if( mHealthBar->getSubWidgetMain() ) mHealthBar->getSubWidgetMain()->_setColour(colour);

None of these methods will change the colour of the inner progress bar.

Any suggestions?