-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstart.py
More file actions
42 lines (32 loc) · 899 Bytes
/
start.py
File metadata and controls
42 lines (32 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/python
import sys
import gtk
import gtk.glade
import gnome.ui
""" In this Aplication ist Glade used in Mode GtkBuilder, 2.16 """
class mainwindowGTK:
""" This is the main Window of the aplication """
def __init__(self):
# Window Open
self.gladefile = "main.glade"
self.builder = gtk.Builder()
self.builder.add_from_file(self.gladefile)
self.builder.connect_signals(self)
self.builder.get_object("window1").show()
def run(self):
try:
gtk.main()
except KeyboardInterrupt:
pass
def quit(self):
gtk.main_quit()
def btnInfo_clicked(self, *args):
# aendert den Text im Label1
hilfe = self.builder.get_object('label1')
hilfe.set_label('Jo')
def on_window1_delete_event(self, *args):
self.quit()
if __name__ == "__main__":
""" instantiate Class/Program an GTK """
mawi = mainwindowGTK()
mawi.run()