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.setText(self.text[0:self.currPos] + "_" + self.text[self.currPos] + "_" + self.text[self.currPos + 1:])
21 def createWidget(self, parent):
25 s = self.instance.calculateSize()
26 return (s.width(), s.height())
30 if self.currPos == len(self.text):
31 self.text = self.text + " "
38 def number(self, number):
39 self.text = self.text[0:self.currPos] + self.numericalTextInput.getKey(number) + self.text[self.currPos + 1:]