X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/e8f4b9242fc67bcea9b561d3e7bc34c25b3ea0a1..0a7e2ed8d31048eee98bf2ffd794743d30d9b953:/lib/python/Screens/ChoiceBox.py diff --git a/lib/python/Screens/ChoiceBox.py b/lib/python/Screens/ChoiceBox.py index f38f0363..60aa5e10 100644 --- a/lib/python/Screens/ChoiceBox.py +++ b/lib/python/Screens/ChoiceBox.py @@ -10,7 +10,7 @@ from Components.ChoiceList import ChoiceEntryComponent, ChoiceList import os class ChoiceBox(Screen): - def __init__(self, session, title = "", list = [], keys = None): + def __init__(self, session, title = "", list = [], keys = None, selection = 0): Screen.__init__(self, session) self["text"] = Label(title) @@ -24,11 +24,11 @@ class ChoiceBox(Screen): pos = 0 for x in list: strpos = str(self.keys[pos]) - self.list.append(ChoiceEntryComponent(strpos, x)) + self.list.append(ChoiceEntryComponent(key = strpos, text = x)) if self.keys[pos] != "": self.keymap[self.keys[pos]] = list[pos] pos += 1 - self["list"] = ChoiceList(self.list) + self["list"] = ChoiceList(list = self.list, selection = selection) self["actions"] = NumberActionMap(["WizardActions", "InputActions", "ColorActions"], {