|
From: Brett S. <bre...@ya...> - 2006-02-21 04:50:38
|
--- Joe English <jen...@fl...> wrote: > > Joey Mukherjee asked: > > > > Is it possible to have a Tile tree widget where > one could edit the > > fields within it? If Tile doesn't currently have > this, is it planned? > > Not at present. Brett Schwarz recently mentioned on > c.l.t. that he > had some code to do this (Brett? Is this publically > available?), > but Tile doesn't support it out-of-the-box right > now. > Sorry, I was going to follow up to this earlier, but got side tracked. I just posted some more earlier today on CLT: http://tinyurl.com/f7som its a brief outline of what I had to do. > I don't have any immediate plans to add it, either, > but here's > how I see it working: first, a general-purpose > "edit-in-place" > utility that would create an entry widget, [place] > it in > an existing widget at a programmer-specified > location, and > eventually pass the edited value to a user-supplied > callback > (on <KeyPress-Return>, <FocusOut>, etc.) Second, > the ttk::treeview > will need a [$tv bbox $item $column] method, to > figure out where > to place the entry widget. And third, a new utility > procedure like > [ttk::treeview::editCell $tv $item $cell] that would > glue the first > two pieces together. (This should probably have a > callback option > too; not sure yet.) The application programmer can > call this > routine from widget bindings as appropriate for the > application > Actually, for now, I would be happy to take the bbox method, to identify coords of the item in question (per column too). If this was there, then the code I worked up would be half the size most likely. Of course I would rather have a full solution :) but having the bbox would go a long way. HTH, --brett --brett __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |