|
From: Jeff H. <je...@Ac...> - 2006-01-29 20:30:50
|
> First off: the syntax of the [$tv identify] command is > being replaced with something more sensible. > | pathname identify row _x_ _y_ > | pathname identify column _x_ _y_ > > More subcommands will be added as needed, these two seem > to be the most useful. The old, horrible, 4-argument form > [$tv identify $x $y] will stick around for a while, but > I hope to phase it out as soon as it's convenient to do so. Is that the best alternate form though? What if you want to know the row and column as an index? You have to make 2 calls. What tktable does (which is by no means a clean API) is '$table index $index ?row|col?', where a type specifier comes last. IIRC, I added that to maintain support for the existing index command. Also, $index is a single argument that can be @$x,$y (which other Tk widgets are familiar with), or special items like 'anchor', 'active', etc. > So, new plan: The ttk::treeview's default bindings will not > include any behavior for modifying the selection (this is how > the BWidget Tree works). There will be a small set of > predefined selection modes (to be determined, will probably > include 'single', 'multiple', and 'extended' a la the core > Listbox widget). Selection modes can be activated with: > > ttk::treeview::selectMode $tv $mode > > This procedure will (probably) be implemented by adjusting > the widget's bindtags; I haven't worked out the details yet. While I agree with using listbox style select modes (which tktable uses as well), what do you mean by behavior for modifying the selection? Like a double-click to edit mode? It seems reasonable to have the user be required to add that binding, but BWidgets does have a command to make that easy ($tree edit $node ...). Another thing that BWidgets has that I've used before is -selectable for an item (like making root nodes not selectable). Jeff |