Removing label text?
#1
If I have two or more labels like so:
Code:
self.strAction = xbmcgui.ControlLabel(100, 100, 120, 200, '', 'font14', '0xFF00FF00')
self.addControl(self.strAction)
self.strAction.setLabel('Hello!')

self.strAction = xbmcgui.ControlLabel(100, 200, 120, 200, '', 'font14', '0xFF00FF00')
self.addControl(self.strAction)
self.strAction.setLabel('Hello! Part 2')

How do I remove all labels?

If I write self.removeControl(self.strAction), it only seems to remove the last label made.
Reply
#2
that's because self.strAction is overridden when you create your second label. Name them differently if you want to be able to remove them (or interact with them in other ways) later.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Well, that was simple...many thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
Removing label text?0