yoda54 has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to create a Tk app with multiple list boxes. The problem is when I select an item from one box it automatically deselects the items from the other. What am I doing wrong?
Thanks Monks!!!
#!/usr/bin/perl -w use strict; use warnings; use Tk; my $mw = MainWindow->new; my $frame = $mw->Frame->pack(-side => 'top', -fill => 'x'); my $box1 = $mw->Scrolled("Listbox", -scrollbars => 'osoe', -height => 10, -selectmode => "multiple")->p +ack(-fill => 'x'); my $box2 = $mw->Scrolled("Listbox", -scrollbars => 'osoe', -height => 10, -selectmode => "multiple")->p +ack(-fill => 'x'); #test data for my $x (1..100) { $box1->insert('end', $x); $box2->insert('end', $x); } MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk - Multiple List Boxes
by injunjoel (Priest) on Jan 07, 2005 at 17:42 UTC |