469,903 Members | 2,013 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Tkinter: Selecting one item in each of two listboxes

I have an application that produces two listboxes. I would like to be
able to select one of the items in the first listbox and one of the
items in the second listbox. However, when I make my selection in the
second listbox, the selected item in the first listbox gets deselected.
Is there a way to do this? I tried setting selectmode to MULTIPLE, but
that option only allows me to select multiple items in one of the
listboxes (both of which get deselected when I make a selection in the
second listbox).

I create the listboxes as follows:

listbox1_frame = Frame(root)
listbox1_frame.pack()
listbox1 = Listbox(listbox1_frame, width = 40, height = 12)
listbox1.pack()

listbox2_frame = Frame(root)
listbox2_frame.pack()
listbox2 = Listbox(listbox2_frame, width = 40, height = 8)
listbox2.pack()

--
Jeffrey Barish
Jul 18 '05 #1
0 1175

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Zhang Le | last post: by
2 posts views Thread by Andrew Trevorrow | last post: by
4 posts views Thread by rn5a | last post: by
3 posts views Thread by rahulnag22 | last post: by
3 posts views Thread by rahulnag22 | last post: by
3 posts views Thread by J-Burns | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.