diff options
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/MenuList.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/python/Components/MenuList.py b/lib/python/Components/MenuList.py index 0e337198..f4b2c361 100644 --- a/lib/python/Components/MenuList.py +++ b/lib/python/Components/MenuList.py @@ -4,12 +4,13 @@ from GUIComponent import * from enigma import eListboxPythonStringContent, eListbox class MenuList(HTMLComponent, GUIComponent): - def __init__(self, list): + def __init__(self, list, enableWrapAround=False): GUIComponent.__init__(self) self.list = list self.l = eListboxPythonStringContent() self.l.setList(self.list) self.onSelectionChanged = [ ] + self.enableWrapAround = enableWrapAround def getCurrent(self): return self.l.getCurrentSelection() @@ -18,6 +19,8 @@ class MenuList(HTMLComponent, GUIComponent): self.instance = eListbox(parent) self.instance.setContent(self.l) self.instance.selectionChanged.get().append(self.selectionChanged) + if self.enableWrapAround: + self.instance.setWrapAround(True) def GUIdelete(self): self.instance.setContent(None) @@ -52,4 +55,4 @@ class MenuList(HTMLComponent, GUIComponent): def selectionEnabled(self, enabled): if self.instance is not None: - self.instance.setSelectionEnable(enabled)
\ No newline at end of file + self.instance.setSelectionEnable(enabled) |
