|
From: Joe E. <jen...@fl...> - 2006-09-26 19:53:24
|
For review: proposed '-selectmode' option for the ttk::treeview widget.
| Command-Line Name:-selectmode
| Database Name: selectMode
| Database Class: SelectMode
|
| Controls how the built-in class bindings manage the selection.
| One of multiple, single, or none.
|
| If set to multiple (the default), multiple items may be
| selected. If single, only a single item will be selected at a
| time. If none, the selection will not be changed.
|
| Note that application code and tag bindings can set the selec-
| tion however they wish, regardless of the value of -selectmode.
This is (intentionally) a minimal set, intended to cover only
the two most common use cases. If applications need something
different, they can use '-selectmode none' and implement
whatever behaviour they want in widget and/or tag bindings.
This should (hopefully!) not be too difficult.
Other potentially-useful selection modes I can think of are:
Single-selection submodes:
+ selection optional or exactly one item selected?
+ independent focus or focus item linked to selection?
Multiple-selection submodes:
+ contiguous or disjoint selection?
+ "anchored" mode or "expansion" mode when extending selection?
+ <B1-Motion>: extend selection, or begin drag-and-drop?
Current choices are: focus item linked to selection in 'single' mode;
selection extension uses "anchored" mode (anchor is the focus item);
disjoint selections are allowed; <B1-Motion> is currently a no-op.
'-selectmode extended' and '-selectmode browse' were omitted on purpose.
These are well-established, but not, I think, terribly well-defined.
--Joe English
jen...@fl...
|