PHP 7.4.33
Preview: grid.py Size: 550 B
//lib64/python2.7/Demo/tix/grid.py

###
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()

Directory Contents

Dirs: 2 × Files: 8

Name Size Perms Modified Actions
bitmaps DIR
- drwxr-xr-x 2024-08-07 14:25:45
Edit Download
samples DIR
- drwxr-xr-x 2024-08-07 14:25:45
Edit Download
550 B lrw-r--r-- 2020-04-19 21:13:39
Edit Download
1.25 KB lrw-r--r-- 2024-04-10 04:58:47
Edit Download
1.25 KB lrw-r--r-- 2024-04-10 04:58:47
Edit Download
3.67 KB lrw-r--r-- 2020-04-19 21:13:39
Edit Download
726 B lrw-r--r-- 2020-04-19 21:13:39
Edit Download
37.51 KB lrw-r--r-- 2020-04-19 21:13:39
Edit Download
37.70 KB lrw-r--r-- 2024-04-10 04:58:47
Edit Download
37.70 KB lrw-r--r-- 2024-04-10 04:58:47
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).