diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-02-25 04:05:35 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-02-25 04:05:35 +0000 |
| commit | 714488394a5c552b175f69682ac2001f8f1b6345 (patch) | |
| tree | 0189089b5a013566aa1778876528dcf0df4c5308 /lib/python/Plugins/DemoPlugins | |
| parent | 842dabf727814691bfd949ac4d910ce04c32b887 (diff) | |
| download | enigma2-714488394a5c552b175f69682ac2001f8f1b6345.tar.gz enigma2-714488394a5c552b175f69682ac2001f8f1b6345.zip | |
add InputBox screen for textual input
Diffstat (limited to 'lib/python/Plugins/DemoPlugins')
| -rw-r--r-- | lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py b/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py index 5991f594..856c2f3b 100644 --- a/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py +++ b/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py @@ -7,6 +7,7 @@ from Components.Input import Input from Components.GUIComponent import * from Components.Pixmap import Pixmap from Components.FileList import FileEntryComponent, FileList +from Screens.InputBox import InputBox from Plugins.Plugin import PluginDescriptor import os @@ -45,6 +46,11 @@ class Test(Screen): "0": self.keyNumberGlobal }, -1) + self.onShown.append(self.openTest) + + def openTest(self): + self.session.open(InputBox) + def keyLeft(self): self["text"].left() @@ -63,7 +69,12 @@ class Test(Screen): self["text"].number(number) def main(session): - session.open(Test) + session.openWithCallback(test, InputBox, title="Hallo", text="1234", maxSize=True, type=Input.NUMBER) + +def test(returnValue): + print "You entered", returnValue def Plugins(): return PluginDescriptor(name="Test", description="plugin to test some capabilities", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main) + +
\ No newline at end of file |
