Kodi Community Forum
How to add a control to the home window programatically? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: How to add a control to the home window programatically? (/showthread.php?tid=178780)



How to add a control to the home window programatically? - nickthemagicman - 2013-11-24

How do I add a control from the home window

For example:

If I created a label
label = xbmcgui.ControlLabel(100, 250, 125, 75, 'Status', angle=45)


How would I add this control to the home window programaticlly?

I assume I would have to get the home window somehow, then add the new control to it.

Thanks in advance!


RE: How to add a control to the home window programatically? - Roman_V_M - 2013-11-25

(2013-11-24, 05:07)nickthemagicman Wrote: How do I add a control from the home window

For example:

If I created a label
label = xbmcgui.ControlLabel(100, 250, 125, 75, 'Status', angle=45)


How would I add this control to the home window programaticlly?

I assume I would have to get the home window somehow, then add the new control to it.

Thanks in advance!

You need to create a xbmcgui.Window instance with a proper ID and then add your control to that instance.