equal
deleted
inserted
replaced
5 import locale |
5 import locale |
6 import os |
6 import os |
7 |
7 |
8 from tuikit.application import Application |
8 from tuikit.application import Application |
9 from tuikit.window import Window |
9 from tuikit.window import Window |
|
10 from tuikit.scrollwindow import ScrollWindow |
10 from tuikit.button import Button |
11 from tuikit.button import Button |
11 from tuikit import AnchorLayout |
12 from tuikit.layout import AnchorLayout |
12 from tuikit.common import Borders |
13 from tuikit.common import Borders |
|
14 from tuikit.editbox import EditBox |
13 |
15 |
14 |
16 |
15 class MyApplication(Application): |
17 class MyApplication(Application): |
16 def __init__(self): |
18 def __init__(self): |
17 Application.__init__(self) |
19 Application.__init__(self) |
21 |
23 |
22 #edit = EditField(50, 'DlouhyTest12') |
24 #edit = EditField(50, 'DlouhyTest12') |
23 #self.top.add(edit) |
25 #self.top.add(edit) |
24 |
26 |
25 win = Window() |
27 win = Window() |
26 win.title = 'demo_window' |
28 win.title = 'demo window' |
27 win.resize(80, 25) |
29 win.resize(40, 25) |
28 self.top.add(win, halign='left', valign='top') |
30 self.top.add(win, halign='left', valign='top') |
29 |
31 |
30 button = Button('click!') |
32 button = Button('click!') |
31 # win.add(button, x=10, y=6) |
33 # win.add(button, x=10, y=6) |
32 |
34 |
35 |
37 |
36 subwin = Window() |
38 subwin = Window() |
37 subwin.name = 'subwin' |
39 subwin.name = 'subwin' |
38 win.add(subwin) |
40 win.add(subwin) |
39 |
41 |
|
42 swin = ScrollWindow() |
|
43 swin.title = 'scroll window' |
|
44 swin.resize(40, 25) |
|
45 self.top.add(swin) |
|
46 |
|
47 swin.move(x=40) |
|
48 |
|
49 text = open('tuikit/widget.py').read() |
|
50 editbox = EditBox(text) |
|
51 swin.add(editbox) |
40 |
52 |
41 def on_button_click(self, ev): |
53 def on_button_click(self, ev): |
42 self.button.label = 'YES' |
54 self.button.label = 'YES' |
43 return True |
55 return True |
44 |
56 |