[Tkinter-discuss] Re: Another problem -- deselecting individual entries in Tix HList

Martin Franklin mart.franklin at gmail.com
Mon Feb 28 21:31:55 CET 2005

Jared Cohen wrote:
> According to the documentation for the Tcl version of Tix, it's possible 
> to use selection_clear() to deselect individual entries, as opposed to 
> the entire selection. The documentation says the following:
> pathName selection clear ?from? ?to?
> When no extra arguments are given, deselects all of the list entrie(s) 
> in this HList widget. When only from is given, only the list entry 
> identified by from is deselected. When both from and to are given, 
> deselects all of the list entrie(s) between between from and to, 
> inclusive, without affecting the selection state of entries outside that 
> range.
> However, I can't for the life of me figure out how to get this 
> functionality in Python. You'd think that you could just pass in "from" 
> and "to" as individual arguments, but you'd be wrong -- the Python 
> version of selection_clear() has the form:    selection_clear(self, 
> cnf={}, **kw) . It expects a dictionary and/or a keyword list. And I 
> can't figure out the right syntax for that "from-to" thing. Can anyone 
> help please?

whoops I should have checked its from_  (trailing underscore!)
sorry for any _confusion_


More information about the Tkinter-discuss mailing list