467,877 Members | 917 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,877 developers. It's quick & easy.

Tkinter: select multiple entries in Listbox widget?

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.
Thanks
Bernard
Jun 1 '06 #1
  • viewed: 10090
Share:
3 Replies
Bernard Lebel wrote in news:mailman.6413.1149178158.27775.python-
li**@python.org 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-prese...ssListbox.html

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

Rob.
--
http://www.victim-prime.dsl.pipex.com/
Jun 1 '06 #2
Oh, thanks a lot Rob.
Bernard

On 6/1/06, Rob Williscroft <rt*@freenet.co.uk> wrote:
Bernard Lebel wrote in news:mailman.6413.1149178158.27775.python-
li**@python.org 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-prese...ssListbox.html

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

Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list

Jun 1 '06 #3
Rob Williscroft wrote:
Bernard Lebel wrote in news:mailman.6413.1149178158.27775.python-
li**@python.org 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-prese...ssListbox.html

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

Rob.

cool.
never needed it so far but it's nice to know :D
Jun 2 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Patrick L. Nolan | last post: by
2 posts views Thread by Tonino | last post: by
3 posts views Thread by groves | last post: by
3 posts views Thread by vedran_dekovic | last post: by
reply views Thread by Svenn Bjerkem | last post: by
6 posts views Thread by Gigs_ | last post: by
2 posts views Thread by Ben Collver | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.