[Tkinter-discuss] Two Listbox problem

Cameron Laird Cameron at phaseit.net
Tue Sep 30 22:24:50 CEST 2008

On Tue, Sep 30, 2008 at 03:58:25PM -0400, Ralph Tindell wrote:
> I have a Tkinter app where I have two Listbox widgets in different frames
> with both frames in a parent frame.  I want to restrict each Listbox to one
> selection, but be able to make a selection in each box simultaneously.  But
> I am only able to select one entry in the two boxes, i.e., a selection in
> one box forces the other box to lose its selection.  At least as far as the
> highlighting is concerned.  Anyone have any advice?
This is a FAQ.  I write that to communicate that the solution
is well understood, not to criticize your research.  As one
standard reference puts it,

  If you have more than one listbox on the screen,
  this really messes things up for the poor user.
  If she selects something in one listbox, and then
  selects something in another, the original selection

Look for "exportselection=0" in <URL:
http://effbot.org/tkinterbook/listbox.htm >.

More information about the Tkinter-discuss mailing list