###
import Tix as tk
from pprint import pprint
r= tk.Tk()
r.title("test")
l=tk.Label(r, name="a_label")
l.pack()
class MyGrid(tk.Grid):
def __init__(self, *args, **kwargs):
kwargs['editnotify']= self.editnotify
tk.Grid.__init__(self, *args, **kwargs)
def editnotify(self, x, y):
return True
g = MyGrid(r, name="a_grid",
selectunit="cell")
g.pack(fill=tk.BOTH)
for x in xrange(5):
for y in xrange(5):
g.set(x,y,text=str((x,y)))
c = tk.Button(r, text="Close", command=r.destroy)
c.pack()
tk.mainloop()
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| bitmaps | Folder | 0755 |
|
|
| samples | Folder | 0755 |
|
|
| INSTALL.txt | File | 3.67 KB | 0644 |
|
| README.txt | File | 726 B | 0644 |
|
| grid.py | File | 550 B | 0644 |
|
| grid.pyc | File | 1.25 KB | 0644 |
|
| grid.pyo | File | 1.25 KB | 0644 |
|
| tixwidgets.py | File | 37.51 KB | 0644 |
|
| tixwidgets.pyc | File | 37.7 KB | 0644 |
|
| tixwidgets.pyo | File | 37.7 KB | 0644 |
|