equal
deleted
inserted
replaced
2 # -*- coding: utf-8 -*- |
2 # -*- coding: utf-8 -*- |
3 |
3 |
4 import locale |
4 import locale |
5 locale.setlocale(locale.LC_ALL, '') |
5 locale.setlocale(locale.LC_ALL, '') |
6 |
6 |
7 from tuikit import Application, Label, VerticalLayout |
7 from tuikit import Application, Window, Label, VerticalLayout |
8 |
8 |
9 |
9 |
10 class MyApplication(Application): |
10 class MyApplication(Application): |
11 def __init__(self): |
11 def __init__(self): |
12 Application.__init__(self) |
12 Application.__init__(self) |
13 self.top.add_handler('keypress', self.on_top_keypress) |
13 self.top.add_handler('keypress', self.on_top_keypress) |
|
14 |
|
15 win = Window() |
|
16 self.top.add(win) |
|
17 win.layout = VerticalLayout() |
14 |
18 |
15 for attr in ['blink', 'bold', 'standout', 'underline']: |
19 for attr in ['blink', 'bold', 'standout', 'underline']: |
16 label = Label(attr) |
20 label = Label(attr) |
17 label.color = 'test-' + attr |
21 label.color = 'test-' + attr |
18 self.top.add(label) |
22 self.top.add(label) |