Re: Tkinter: select multiple entries in Listbox widget?



Bernard Lebel wrote in news:mailman.6413.1149178158.27775.python-
list@xxxxxxxxxx in comp.lang.python:

Hello,

Is there an option or a way to allow the selection of multiple entries
in the Listbox widget? I could not find any, and would like to allow
the end user to select multiple entries.



When configuring use:

selectmode = "multiple"

e.g.:

import Tkinter as tk

root = tk.Tk()

a = tk.Listbox( root, selectmode = "multiple" )
for i in range(10):
a.insert( i, str(i) + " item" )

a.pack()
root.mainloop()

I found the answer here:

http://www.python.org/doc/life-preserver/ClassListbox.html

Though I had to guess the `= "multiple"` part.

Rob.
--
http://www.victim-prime.dsl.pipex.com/
.



Relevant Pages

  • Multi Select controls another List Box
    ... I need some help on creating a list box that when multiple entries are ... The main form displays the sales projects in the List Box ... There are controls on the form that will filter lst_funnel by ... I can easily get this to work with just one selection, ...
    (microsoft.public.access.formscoding)
  • Re: Limit query results to 1 item
    ... FROM tblFullSelectInfo INNER JOIN ... When i run the report/query normal, i get 8 pages of people with numerous dates showing no completion, say most with selection date of 31 Mar 08. ... If I have 30 people on my report with 3-4 dates each, how do I get it to show 30 people, but only their latest date selected? ... I get multiple results for some people due to multiple entries when selected with no completion date. ...
    (microsoft.public.access.queries)
  • Printing only selected ranges in "notes"
    ... Can a group or selection of notes e.g., one month at a time, be printed? ... I have many, multiple entries in Outlook "notes" on a daily basis, it seems I ...
    (microsoft.public.outlook)
  • Re: Limit query results to 1 item
    ... say most with selection date of 31 Mar ... If I have 30 people on my report with 3-4 dates each, how do I get it to ... "Armen Stein" wrote: ... I get multiple results for some people due to multiple entries when ...
    (microsoft.public.access.queries)
  • Re: Tkinter: select multiple entries in Listbox widget?
    ... Rob Williscroft wrote: ... Is there an option or a way to allow the selection of multiple entries ... in the Listbox widget? ...
    (comp.lang.python)