1 """and example of how to implement tabs"""
4 from pygame.locals import *
6 # the following line is not needed if pgu is installed
7 import sys; sys.path.insert(0, "..")
14 #####################################
15 c = gui.Container(width=240,height=120)
22 item = gui.Button(gui.Label('Disable'))
23 item.connect(gui.CLICK,i_disable,None)
28 w.value = gui.Label('Remove')
29 w.connect(gui.CLICK,c_remove,w)
34 w.value = gui.Label('Add')
35 w.connect(gui.CLICK,c_add,w)
39 w.connect(gui.CLICK,c_add,w)
42 #################################
43 t = gui.Table(width=240,height=120)
50 w = gui.Label(str(tn))
62 w.connect(gui.CLICK,t_add,None)
65 w = gui.Button('Remove')
66 w.connect(gui.CLICK,t_remove,None)
69 #####################################
70 d = gui.Document(width=240,height=120)
76 w = gui.Label("%d "%dn)
87 w.connect(gui.CLICK,d_add,None)
91 w = gui.Button('Remove')
92 w.connect(gui.CLICK,d_remove,None)
95 #######################################
102 g.connect(gui.CHANGE,tab)
107 b = gui.Tool(g,gui.Label("Container"),c)
109 b = gui.Tool(g,gui.Label("Table"),t)
111 b = gui.Tool(g,gui.Label("Document"),d)
115 spacer = gui.Spacer(240,120)
116 box = gui.ScrollArea(spacer,height=120)
117 tt.td(box,style={'border':1},colspan=3)
119 app.connect(gui.QUIT,app.quit,None)