Commit before breaking everything
[matches/honours.git] / research / transmission_spectroscopy / simulator / pgu-0.18 / examples / gui13.py
1 """an example of chsize"""
2 import pygame
3 from pygame.locals import *
4
5 # the following line is not needed if pgu is installed
6 import sys; sys.path.insert(0, "..")
7
8 from pgu import gui
9 from pgu import html
10
11 app = gui.Desktop()
12
13 c = gui.Table(width=500,height=500)
14 c.tr()
15
16 dw = 400
17 data = """
18 <div style='margin: 8px; padding: 8px; border: 1px; border-color: #88ffff; background: #eeffff;'><img src='cuzco.png' align=right>cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. </div>"""
19 doc = html.HTML(data,width=dw)
20 c.td(doc)
21
22 c.tr()
23 s = gui.HSlider(300,200,450,100,width=dw)
24 def mychange(value):
25     s,doc = value
26     doc.style.width = s.value
27     doc.chsize()
28 s.connect(gui.CHANGE,mychange,(s,doc))
29 c.td(s)
30
31 app.connect(gui.QUIT,app.quit,None)
32 app.run(c)

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