Change the color for Label in python
#1
Hi all

I need some help with python, I want to change the color of the text in the label when I added the control.

When I use this:

Code:
self.label = xbmcgui.ControlLabel(100, 250, 125, 75, 'My Label Text', textColor='0xFFFFFFFF')
self.addControl(self.label)



So when I set the label text like this:

Code:
self.label.setLabel('My New Label Text')


I want to know how do you change the color for the text in the label using the control id?
Reply
#2
you could try '[COLOR FFAABBCC]My Label Text[/COLOR]'
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#3
Thank you very much for this Phil, I can see it is working right now when I use this:

Code:
self.label.setLabel('[COLOR FF00C936]My Label Text[/COLOR]')



Cheers!
Reply

Logout Mark Read Team Forum Stats Members Help
Change the color for Label in python0