9

I've a Treeview widget, and I need only one row/item to be selected at a time. I've been reading the doc, but I can't find any property or method to do so, nor I've found something useful on SO.

Is it posible? How to?

Btc Sources
  • 1,912
  • 2
  • 30
  • 58

1 Answers1

15

The answer is a bit higher up the page:

selectmode

Controls how the built-in class bindings manage the selection. One of “extended”, “browse” or “none”. If set to “extended” (the default), multiple items may be selected. If “browse”, only a single item will be selected at a time. If “none”, the selection will not be changed.

Note that the application code and tag bindings can set the selection however they wish, regardless of the value of this option.

Setting selectmode="browse" should give the behavior you're asking for.

Community
  • 1
  • 1
fhdrsdg
  • 10,297
  • 2
  • 41
  • 62
  • What I needed to use was `selectmode="none"` and your answer solved my problem which was a similar but different question than OP's. – WinEunuuchs2Unix Aug 30 '20 at 18:22