custom Tkinter ListBox selectMode

Eric Brunel eric_brunel at despammed.com
Mon Jul 4 09:00:50 CEST 2005


On Fri, 1 Jul 2005 20:19:20 -0400, Ron Provost <ronpro at cox.net> wrote:

> Hello,
>
> I've written a simple GUI which contains a listbox to hold some information.
> I've found that the click-selection schemes provided by Tkinter are
> insufficient for my needs.  Essentiall I need to impletement a custom
> selectMode.  As a first go, I've attempted to implement a click-on-click-off
> mode.  So for each entry, a click on that entry toggels its selection mode.
> A click on any entry does not affect the selection mode of any other entry.

What you describe is exactly the behavior you get when you set selectmode='multiple' on a list box; see:
http://www.tcl.tk/man/tcl8.3/TkCmd/listbox.htm#M57

HTH
-- 
python -c "print ''.join([chr(154 - ord(c)) for c in 'U(17zX(%,5.zmz5(17;8(%,5.Z65\'*9--56l7+-'])"



More information about the Python-list mailing list