e5ccb1673e4f26bc4ce76563fac1d1749a253c46
[matches/honours.git] / research / transmission_spectroscopy / simulator / pgu-0.18 / examples / gui2.py
1 """<title>Connections</title>
2 Same as the first -- but now you can click on the close window button
3 in your windowing system to close out the example.
4 """
5
6 import pygame
7 from pygame.locals import *
8
9 # the following line is not needed if pgu is installed
10 import sys; sys.path.insert(0, "..")
11
12 from pgu import gui
13
14 app = gui.App()
15 ##The gui.QUIT event is connected to the app.close method.
16 ##::
17 app.connect(gui.QUIT,app.quit,None)
18 ##
19
20 e = gui.Button("This is a really long button.")
21
22 app.run(e)
23
24

UCC git Repository :: git.ucc.asn.au