Rambus
25-05-2011 06:12:55
Hello,
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:
mHealthBar->setColour(colour);
mHealthBar->setTextColour(colour);
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?
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:
mHealthBar->setColour(colour);
mHealthBar->setTextColour(colour);
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?