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

Jared Cohen Jared.Cohen at noaa.gov
Mon Feb 28 20:11:28 CET 2005

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 

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?

More information about the Tkinter-discuss mailing list