I only used one text field here, but otherwise I think this what you want as a starting point:
#!/usr/bin/perl -W use warnings 'all'; use strict; use Tk::Pane; my %data; while (<DATA>) { m/^(.)(.+?)\s+$/ and push @{ $data{"\u$1"} }, "\u$1\L$2"; } my $mw = Tk::MainWindow->new(); my $left_pane = $mw->Scrolled( 'Pane', -scrollbars => 'oe' )->pack( -expand => 'yes', -fill => 'y', -side => 'left', ); my $right_pane = $mw->Scrolled( 'Pane', -scrollbars => 'oe' )->pack( -expand => 'yes', -fill => 'y', -side => 'right', ); my $middle_pane = $mw->Scrolled( 'Pane', -scrollbars => 'oe' )->pack( -expand => 'yes', -fill => 'x', -side => 'top', ); my $mid_entry = $middle_pane->Scrolled( 'Entry', -relief => 'sunken', -scrollbars => 's', )->pack(); my @right_list; sub alter_mid_and_right_panes { my ($key,$value) = @_; return unless $value; # Don't change when unchecking left box. while( my $cb = pop @right_list ) { $cb->destroy(); } $mid_entry->delete(0, length($mid_entry->get())); $mid_entry->insert( 'end', "Ah, '$key'. What a great letter! I remember her well." ); for my $word ( sort @{ $data{$key} } ) { my $cb = $right_pane->Checkbutton( -anchor => 'w', -text => $word, )->pack( -side => 'top', -fill => 'x', ); push @right_list, $cb; } } my @list; for my $key ( sort keys %data ) { my $value; my $cb = $left_pane->Checkbutton( -anchor => 'w', -text => $key, -variable => \$value, -command => sub { alter_mid_and_right_panes($key, $value) }, )->pack( -side => 'top', -fill => 'x', ); push @list, \$value; } Tk::MainLoop(); __DATA__ Abe Apple Baker Bananna

In reply to Re: Tk List of Checkboxes? by Util
in thread Tk List of Checkboxes? by Flame

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.