Thanks zentara. The Tk::CheckbuttonGroup module works great! It looks like the synopsis code was missing "pack". Unfortunately, I just found out I'm not going to be able to install additional CPAN modules at deployment sites (sigh), so (taking a cue from the module) I re-worked the frames in my original code to display two vertically aligned columns of checkboxes using only Tk (see new code below). Thanks for all your help.

#!/usr/bin/perl use strict; use warnings; use Tk; my $mw = MainWindow->new(); $mw->geometry('360x250+280+60'); $mw->bind('<Escape>' => sub {exit;}); $mw->configure(-title => 'Test Checkbox Alignment'); my ($qv, $dg, $yb, $pv, $rd, $oc, $hr, $tm); ################################################################### # Create buffer 1. ################################################################### my $buffer1 = $mw->Frame; $buffer1->pack(-side => 'left', -padx => 25); ################################################################### # Create frame 1. ################################################################### my $frame1 = $mw->Frame; $frame1->pack(-side => 'left'); ################################################################### # Create check box 1 for frame 1. ################################################################### my $qv_cbox = $frame1->Checkbutton( -text => 'QuickCheck', -variable => \$qv, ); $qv_cbox->pack( -side => 'top', -anchor => 'w', ); ################################################################### # Create check box 2 for frame 1. ################################################################### my $dg_cbox = $frame1->Checkbutton( -text => 'Systems Guide', -variable => \$dg, ); $dg_cbox->pack( -side => 'top', -anchor => 'w', ); ################################################################### # Create check box 3 for frame 1. ################################################################### my $yb_cbox = $frame1->Checkbutton( -text => 'Study', -variable => \$yb, ); $yb_cbox->pack( -side => 'top', -anchor => 'w', ); ################################################################### # Create check box 4 for frame 1. ################################################################### my $pv_cbox = $frame1->Checkbutton( -text => 'Analyze', -variable => \$pv, ); $pv_cbox->pack( -side => 'top', -anchor => 'w', ); ################################################################### # Create buffer 2. ################################################################### my $buffer2 = $mw->Frame; $buffer2->pack(-side => 'left', -padx => 25); ################################################################### # Create frame 2. ################################################################### my $frame2 = $mw->Frame; $frame2->pack(-side => 'left'); ################################################################### # Create check box 1 for frame 2. ################################################################### my $rd_cbox = $frame2->Checkbutton( -text => 'Read', -variable => \$rd, ); $rd_cbox->pack( -side => 'top', -anchor => 'w', ); ################################################################### # Create check box 2 for frame 2. ################################################################### my $oc_cbox = $frame2->Checkbutton( -text => 'Configure', -variable => \$oc, ); $oc_cbox->pack( -side => 'top', -anchor => 'w', ); ################################################################### # Create check box 3 for frame 2. ################################################################### my $hr_cbox = $frame2->Checkbutton( -text => 'Troubleshoot', -variable => \$hr, ); $hr_cbox->pack( -side => 'top', -anchor => 'w', ); ################################################################### # Create check box 4 for frame 2. ################################################################### my $tm_cbox = $frame2->Checkbutton( -text => 'Prioritize', -variable => \$tm, ); $tm_cbox->pack( -side => 'top', -anchor => 'w', ); MainLoop; exit;

"Its not how hard you work, its how much you get done."


In reply to Re^4: Aligning Tk Checkboxes by roho
in thread Aligning Tk Checkboxes by roho

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.