diff options
Diffstat (limited to 'lib/python/Screens/TextBox.py')
| -rw-r--r-- | lib/python/Screens/TextBox.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/python/Screens/TextBox.py b/lib/python/Screens/TextBox.py new file mode 100644 index 00000000..44b8a3cf --- /dev/null +++ b/lib/python/Screens/TextBox.py @@ -0,0 +1,26 @@ +from Screens.Screen import Screen + +from Components.ActionMap import ActionMap +from Components.Sources.StaticText import StaticText +from Components.ScrollLabel import ScrollLabel + +class TextBox(Screen): + def __init__(self, session, text = ""): + Screen.__init__(self, session) + + self.text = text + self["text"] = ScrollLabel(self.text) + + self["actions"] = ActionMap(["OkCancelActions", "DirectionActions"], + { + "cancel": self.cancel, + "ok": self.ok, + "up": self["text"].pageUp, + "down": self["text"].pageDown, + }, -1) + + def ok(self): + self.close() + + def cancel(self): + self.close() |
