equal
deleted
inserted
replaced
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 |
13 |
14 self.text = '' |
14 self.text = '' |
15 self.textedit = TextEdit(100, 40, self.text) |
15 self.textedit = TextEdit(self.text) |
16 self.top.add(self.textedit) |
16 self.top.add(self.textedit, halign='fill', valign='fill') |
17 self.textedit.x = 2 |
|
18 |
17 |
19 editbox = self.textedit.editbox |
18 editbox = self.textedit.editbox |
20 editbox.add_handler('keypress', self.on_any_input) |
19 editbox.add_handler('keypress', self.on_any_input) |
21 editbox.add_handler('mousedown', self.on_any_input) |
20 editbox.add_handler('mousedown', self.on_any_input) |
22 editbox.add_handler('mouseup', self.on_any_input) |
21 editbox.add_handler('mouseup', self.on_any_input) |