demo_window.py
changeset 74 23767a33a781
parent 62 2f61931520c9
--- a/demo_window.py	Wed Jan 30 20:21:08 2013 +0100
+++ b/demo_window.py	Fri Feb 01 00:24:02 2013 +0100
@@ -7,9 +7,11 @@
 
 from tuikit.application import Application
 from tuikit.window import Window
+from tuikit.scrollwindow import ScrollWindow
 from tuikit.button import Button
-from tuikit import AnchorLayout
+from tuikit.layout import AnchorLayout
 from tuikit.common import Borders
+from tuikit.editbox import EditBox
 
 
 class MyApplication(Application):
@@ -23,8 +25,8 @@
         #self.top.add(edit)
 
         win = Window()
-        win.title = 'demo_window'
-        win.resize(80, 25)
+        win.title = 'demo window'
+        win.resize(40, 25)
         self.top.add(win, halign='left', valign='top')
 
         button = Button('click!')
@@ -37,6 +39,16 @@
         subwin.name = 'subwin'
         win.add(subwin)
 
+        swin = ScrollWindow()
+        swin.title = 'scroll window'
+        swin.resize(40, 25)
+        self.top.add(swin)
+
+        swin.move(x=40)
+
+        text = open('tuikit/widget.py').read()
+        editbox = EditBox(text)
+        swin.add(editbox)
 
     def on_button_click(self, ev):
         self.button.label = 'YES'