from enigma import eListboxPythonStringContent, eListbox
class MenuList(HTMLComponent, GUIComponent):
- def __init__(self, list, enableWrapAround=False, content=eListboxPythonStringContent()):
+ def __init__(self, list, enableWrapAround=False, content=eListboxPythonStringContent):
GUIComponent.__init__(self)
self.list = list
- self.l = content
+ self.l = content()
self.l.setList(self.list)
self.onSelectionChanged = [ ]
self.enableWrapAround = enableWrapAround
for f in self.onSelectionChanged:
f()
+ def getSelectionIndex(self):
+ return self.l.getCurrentSelectionIndex()
+
def getSelectedIndex(self):
return self.l.getCurrentSelectionIndex()