aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/VariableText.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/Components/VariableText.py')
-rw-r--r--lib/python/Components/VariableText.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/python/Components/VariableText.py b/lib/python/Components/VariableText.py
index e2a755c5..bb8b5fe3 100644
--- a/lib/python/Components/VariableText.py
+++ b/lib/python/Components/VariableText.py
@@ -1,9 +1,10 @@
import skin
-class VariableText:
+class VariableText(object):
"""VariableText can be used for components which have a variable text, based on any widget with setText call"""
def __init__(self):
+ object.__init__(self)
self.message = ""
self.instance = None
@@ -19,14 +20,7 @@ class VariableText:
def getText(self):
return self.message
- def GUIcreate(self, parent):
- self.instance = self.createWidget(parent)
- self.instance.setText(self.message)
+ text = property(getText, setText)
- def GUIdelete(self):
- self.removeWidget(self.instance)
- self.instance = None
-
- def removeWidget(self, instance):
- pass
-
+ def postWidgetCreate(self, instance):
+ instance.setText(self.message)