Tkinter: Selecting one item in each of two listboxes

Mickel Grönroos mickel at csc.fi
Tue Apr 20 01:41:25 EDT 2004


On Mon, 19 Apr 2004, Jeffrey Barish wrote:

> 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.

Try setting exportselection to 0, i.e.

listbox.config(exportselection=0)

or in the constructor:

listbox = Listbox(listbox1_frame, exportselection=0)

The selections in the listboxes will not be copied to the clipboard, but
on the other hand you get the effect you wanted, i.e. there can be
selections in more than one listbox at a time.

/Mickel

--
Mickel Grönroos, application specialist, linguistics, Research support, CSC
PL 405 (Tekniikantie 15 a D), 02101 Espoo, Finland, phone +358-9-4572237
CSC is the Finnish IT center for science, www.csc.fi




More information about the Python-list mailing list