Force SetColour


#1

Hi,

 

I have a Combobox and when ever it changes i call SetColour (i.e. setColour(TextEditor::textColourId, Colour (0xFF808080));) to change background and text colour on a couple TextEditors (My text editor is a custom class DoubleTextEditor that is based on TextEditor but not much going on inside). But the colour doesnt show untill the value in the TextEditor changes. Is there a way to force Setcolour? i tried repaint and that didnt work and other things. What will cause my SetColour to show without having to change the value. or do i need to hack it so it resets the same value just so it redraws itself and changes the color i set it to?

 

Regards,

Brad


#2

Maybe call lookAndFeelChanged?


#3

The following changes the background but it doesnt update the Text

 

void DoubleEditor::enablementChanged()

{

    if(isEnabled())

    {

        setColour(backgroundColourId, Colour (0xFF000000));

        setColour(textColourId, Colour (0xFFFFFFFF));

    }

    else

    {

        setColour (textColourId, Colour (0xFF808080));

        setColour (backgroundColourId, Colour (0xFF404040));

    }

}