1 from HTMLComponent import *
2 from GUIComponent import *
3 from VariableText import *
5 from enigma import eLabel
7 from Tools.NumericalTextInput import NumericalTextInput
9 class Input(HTMLComponent, GUIComponent, VariableText):
10 def __init__(self, text=""):
11 GUIComponent.__init__(self)
12 VariableText.__init__(self)
13 self.numericalTextInput = NumericalTextInput(self.right)
19 self.setMarkedPos(self.currPos)
20 self.setText(self.text)
21 #self.setText(self.text[0:self.currPos] + "_" + self.text[self.currPos] + "_" + self.text[self.currPos + 1:])
24 def createWidget(self, parent):
25 return eLabel(parent, self.currPos)
28 s = self.instance.calculateSize()
29 return (s.width(), s.height())
33 if self.currPos == len(self.text):
34 self.text = self.text + " "
41 def number(self, number):
42 self.text = self.text[0:self.currPos] + self.numericalTextInput.getKey(number) + self.text[self.currPos + 1:]