|
From: Joe E. <jen...@fl...> - 2006-02-21 03:44:50
|
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. 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 If there's a one-size-fits-all solution that works for all use cases, this might be promoted to a treeview widget instance method like the BWidget Tree widget has, but probably not. --JE |