##// END OF EJS Templates
Minor work on the gtk example.
Brian Granger -
Show More
@@ -17,11 +17,19 b' import gtk'
17 def hello_world(wigdet, data=None):
17 def hello_world(wigdet, data=None):
18 print "Hello World"
18 print "Hello World"
19
19
20 def delete_event(widget, event, data=None):
21 return False
22
23 def destroy(widget, data=None):
24 gtk.main_quit()
25
20 window = gtk.Window(gtk.WINDOW_TOPLEVEL)
26 window = gtk.Window(gtk.WINDOW_TOPLEVEL)
27 self.window.connect("delete_event", delete_event)
28 self.window.connect("destroy", destroy)
21 button = gtk.Button("Hello World")
29 button = gtk.Button("Hello World")
22 button.connect("clicked", hello_world, None)
30 button.connect("clicked", hello_world, None)
23
31
24 window.add(self.button)
32 window.add(button)
25 button.show()
33 button.show()
26 window.show()
34 window.show()
27
35
General Comments 0
You need to be logged in to leave comments. Login now