Hi I'm trying to place a set of label, entry, label, numEntry one after another. I tried all possilibities for Side and Anchor but it just doesnt seem to work! Here is part of my Code: Any suggestions?
#!/usr/bin/perl use Tk; use Tk::NoteBook; use Tk::CollapsableFrame; use Tk::BrowseEntry; use Tk::Dialog; use Tk::NumEntry; use Tk::Pane; $mw = MainWindow->new(); $mw->geometry( "500x700" ); #P140 my $pane4 = $mw->Scrolled( qw/Pane -width 500 -height 100 -scrollbars ow -sticky ne/, )->pack; my $P140 = $pane4->CollapsableFrame(-title => 'P140', + #title of the collapsable frame -height => 500); + #height of the collapsable frame $P140->pack(qw/-fill x -expand 1/); ###VISK0-3 my $cf_visk0 = $P140->Subwidget('colf'); my $base_visk0 = 6.6824; my $power_visk0 = -8; $cf_visk0->Label(-text=>"VISK0") -> pack(-side => 'left', -anchor => 'w'); $cf_visk0->Entry(-textvariable => \$base_visk0, -width => 10)->pack(-side => 'left', -anchor => 'w'); $cf_visk0->Label(-text=>"E") -> pack(-side => 'left'); $cf_visk0->NumEntry(-minvalue => -20, -maxvalue => 10, -textvariable => \$power_visk0, -width=>5)->pack(-side => 'left', -anchor => 'w'); $cf_visk0->Button(-text => "OK", -command => \&options_visk)->pack(-side => 'left', -anchor => 'w'); $cf_visk0->Button(-text => "Help", -command => \&help_visk0)->pack(-si +de => 'right', -an +chor => 'e'); my $cf_visk1 = $P140->Subwidget('colf'); my $base_visk1 = 6.6047; my $power_visk1 = -10; $cf_visk1->Label(-text=>"VISK1") -> pack(-anchor => 'w'); $cf_visk1->Entry(-textvariable => \$base_visk1, -width => 10)->pack(-side => 'left', -anchor => 'w'); $cf_visk1->Label(-text=>"E") -> pack(-side => 'left', -anchor => 'w'); $cf_visk1->NumEntry(-minvalue => -20, -maxvalue => 10, -textvariable => \$power_visk1, -width=>5)->pack(-side => 'left', -anchor => 'w'); $cf_visk1->Button(-text => "OK", -command => \&options_visk)->pack(-side => 'left', -anchor => 'w'); my $cf_visk2 = $P140->Subwidget('colf'); my $base_visk2 = -1.2627; my $power_visk2 = -13; $cf_visk2->Label(-text=>"VISK2") -> pack(-side => 'left', -anchor => 'w'); $cf_visk2->Entry(-textvariable => \$base_visk2, -width => 10)->pack(-side => 'left', -anchor => 'w'); $cf_visk2->Label(-text=>"E") -> pack(-side => 'left', -anchor => 'w'); $cf_visk2->NumEntry(-minvalue => -20, -maxvalue => 10, -textvariable => \$power_visk2, -width=>5)->pack(-side => 'left', -anchor => 'w'); $cf_visk2->Button(-text => "OK", -command => \&options_visk)->pack(-side => 'left', -anchor => 'w'); MainLoop;

In reply to Side and Anchor??? by lil_v

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.