Hi rooters,
I have a GUI program in which I want to change a button’s background color dynamically. I 'm trying to do this in the following way.
if ( condition ) {
button->SetBackgroundColor( color1 );
}
else {
button->SetBackgroundColor( color2 );
}
But I found the button’s color was not changed immediately. Did I miss something? Is there some way to redraw a button individually? Or I have to notify the main window to redraw everything? If so, how to do that?
Haibing ZHANG