v14 Control list handle (panel)
#1
Sorry I must ask again, but I didn't found anything about it on the forum or in the wiki.
I recently found out to use a control with the type panel to list some video items. If I would use the xbmcplugin class to add items, I can add the url and an addon handle, how do I do this with the panel form the windowxml class?

Thank you!!
Reply
#2
you use xbmcgui.controlList.addItems() to add listitems to the panel and xbmcgui.WindowXML(Dialog).onClick() to deal with the onClick.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#3
The event onClick helps me only to handle clicks on controls with ID, every item in the panel gives the same ID back...
Reply
#4
use getControl(xxx).getSelectedItem(), or, for the index, getSelectedPosition()
(look at xbmcgui.controlList in python docs)
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#5
Thanks! That is what I needed, I always ask me what getSelectedItem does.
Reply
#6
(2015-06-25, 00:42)momly Wrote: Thanks! That is what I needed, I always ask me what getSelectedItem does.

Yes, I admit it´s a bit confusing. A better name for that method would be "getFocusedItem()"
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply

Logout Mark Read Team Forum Stats Members Help
Control list handle (panel)0