2010-12-03, 02:25
I cannot figure out how to add context menu items to my list items. At least I have been unable to open said context menu after creating them.
What I'm doing is basically something like this:
This code does not seem to throw any errors as far as I can see. However, when pressing right-clicking on the list item or pressing 'C' while the item is focused does not bring up a context menu. Indeed, nothing at all happens.
Am I missing something here?
What I'm doing is basically something like this:
Code:
listitem = xbmcgui.ListItem()
#Add some properties to listitem here...
listitem.addContextMenuItems([('Some label here', 'XBMC.RunScript(SomeScriptHere')])
# Do some stuff here...
list.addItem(listitem)
This code does not seem to throw any errors as far as I can see. However, when pressing right-clicking on the list item or pressing 'C' while the item is focused does not bring up a context menu. Indeed, nothing at all happens.
Am I missing something here?