add missing Network.py
[enigma2.git] / lib / python / Components / VariableText.py
1 import skin
2
3 class VariableText:
4         """VariableText can be used for components which have a variable text, based on any widget with setText call"""
5         
6         def __init__(self):
7                 self.message = ""
8                 self.instance = None
9         
10         def setText(self, text):
11                 self.message = text
12                 if self.instance:
13                         self.instance.setText(self.message)
14
15         def getText(self):
16                 return self.message
17         
18         def GUIcreate(self, parent):
19                 self.instance = self.createWidget(parent)
20                 self.instance.setText(self.message)
21         
22         def GUIdelete(self):
23                 self.removeWidget(self.instance)
24                 self.instance = None
25         
26         def removeWidget(self, instance):
27                 pass
28