Skip to main content
HowTo change text colour        

To change the colour of any text within MyGUI simply put in the hex colour value in the text

For example

Copy to clipboard
widget->setCaption("#FF0000Red Text"); widget->setCaption("#00FF00Green Text"); widget->setCaption("#FF0000Colored #00FF00Text");


Example for a list:

Copy to clipboard
list->addItem("#FF0000Red line"); list->addItem("#00FF00Green line"); list->addItem("#FF0000Colored #00FF00line");


You can colour any text used in any widget.