Issue 1462222: Functioning Tix.Grid - Python tracker (original) (raw)

Logged In: YES user_id=539787

Here follows code (testgrid.py) I use to test the patched Tix.py, used as 'python -i testgrid.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)))

Logged In: YES user_id=21627

That patch can't be right: it introduces empty function selection_adjust etc. These functions should, of course, invoke the underlying widget commands.

Please provide a patch that can be used as-is. It might be incomplete (i.e. not expose all functionality), but for the functionality it provides, it should be correct.