Mutli-Column Listboxes in Tkinter?

Doug Hellmann doughellmann at home.com
Wed Dec 8 07:19:25 EST 1999


You could download my PmwContribD package at
http://members.home.net/doughellmann/PmwContribD.  Even though the docs
don't mention it yet, the package includes a multi-columned listbox in
MCScrolledListBox.py.  You can define as many columns as you want when
you create the widget.  When you set the "list," you send a sequence of
sequences to fill in the values.  Selection of a row sets the value of
the listbox to the tuple containing the values from each column. 
Selecting multiple rows sets the value to the sequence of tuples.

Let me know if you have any problems/questions with this.

Doug

Scott Barron wrote:
> 
> Hi,
> 
> Has anyone implemented a multi columned list box in tkinter?  I could really
> use one in my current project and I don't want to switch toolkits.  I have
> rigged one up by throwing a number of listboxes into a grid, but I'm not
> sure if thats the way to go.
> 
> Thanks,
> Scott



More information about the Python-list mailing list