access home's control label by script
#1
Hi,

I want to display some messge at a control label in home window.
I can see how launch new window and write a messge in that new window via tutorials like below. But I cannot find how write some messge in a home window label which I added.

class MainClass(xbmcgui.Window):
def __init__(self):
.....

def localinfos(self):
result = simplejson.load(urllib.urlopen(url))
string=str(result['data']['items'][0]['xid'])
self.strActionInfo = xbmcgui.ControlLabel(100, 150, 500, 200, '', 'font13', '0xFFFFFFFF')
self.addControl(self.strActionInfo)
self.strActionInfo.setLabel(string)


I think last three lines would be changed for home window's label control. But I don't know how to change to point it.

Would you let me know it?

thanks
Chongjin
Reply
#2
To add a Python Control to an existing window you need to create an xbmcgui.Window instance and provide a numerical ID of that windows to the class constructor.
http://wiki.xbmc.org/?title=Window_IDs
Note that you don't need to use doModal() to display the window because the window already exists.
Reply
#3
thanks Roman. It was helpfulSmile
Reply

Logout Mark Read Team Forum Stats Members Help
access home's control label by script0