1 from HTMLComponent import *
2 from GUIComponent import *
4 from MenuList import MenuList
6 from Tools.Directories import *
19 def ChoiceEntryComponent(key, text):
21 res.append((eListboxPythonMultiContent.TYPE_TEXT, 32, 00, 800, 25, 0, RT_HALIGN_LEFT, text[0]))
23 png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "key_" + key + "-fs8.png"))
25 res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 0, 0, 30, 20, png))
29 class ChoiceList(MenuList, HTMLComponent, GUIComponent):
30 def __init__(self, list, selection = 0):
31 GUIComponent.__init__(self)
32 self.l = eListboxPythonMultiContent()
35 self.l.setFont(0, gFont("Regular", 20))
36 self.selection = selection
40 def postWidgetCreate(self, instance):
41 instance.setContent(self.l)
42 instance.setItemHeight(25)
43 self.moveToIndex(self.selection)