Tkinter: Selecting one item in each of two listboxes

Discussion in 'Python' started by Jeffrey Barish, Apr 19, 2004.

  1. 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
    Jeffrey Barish, Apr 19, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Krishna
    Replies:
    0
    Views:
    505
    Krishna
    Jul 13, 2006
  2. tkinter listboxes

    , May 4, 2007, in forum: Python
    Replies:
    3
    Views:
    267
  3. deepak

    mutiple addition/remove in two listboxes

    deepak, Feb 16, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    152
    Ken Cox [Microsoft MVP]
    Feb 16, 2005
  4. ASPirant

    moving items between two listboxes

    ASPirant, Nov 22, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    88
    ASPirant
    Nov 22, 2005
  5. ASPirant

    Transfer between two listboxes

    ASPirant, Nov 22, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    135
    ASPirant
    Nov 22, 2005
Loading...

Share This Page