1 from HTMLComponent import *
2 from GUIComponent import *
3 from VariableText import *
5 from enigma import eButton
7 class Button(VariableText, HTMLComponent, GUIComponent):
8 def __init__(self, text="", onClick = [ ]):
9 GUIComponent.__init__(self)
10 VariableText.__init__(self)
12 self.onClick = onClick
15 for x in self.onClick:
26 def produceHTML(self):
27 return "<input type=\"submit\" text=\"" + self.getText() + "\">\n"
31 def postWidgetCreate(self, instance):
32 instance.setText(self.text)
33 instance.selected.get().append(self.push)