Issue #7673: Fix security vulnerability (CVE-2010-2089) in the audioop module,
[python/dscho.git] / Demo / tix / grid.py
blob07ca87f8e95e84fd881cdd0fb88f37bdbfef65c2
1 ###
2 import Tix as tk
3 from pprint import pprint
5 r= tk.Tk()
6 r.title("test")
8 l=tk.Label(r, name="a_label")
9 l.pack()
11 class MyGrid(tk.Grid):
12 def __init__(self, *args, **kwargs):
13 kwargs['editnotify']= self.editnotify
14 tk.Grid.__init__(self, *args, **kwargs)
15 def editnotify(self, x, y):
16 return True
18 g = MyGrid(r, name="a_grid",
19 selectunit="cell")
20 g.pack(fill=tk.BOTH)
21 for x in xrange(5):
22 for y in xrange(5):
23 g.set(x,y,text=str((x,y)))
25 c = tk.Button(r, text="Close", command=r.destroy)
26 c.pack()
28 tk.mainloop()