Hi,

I have GUI script in perl/tk which will create a label, entry & a browser button, to select a path. later i have 3 more buttons for "run" "refersh" & "exit".

Problem statement: I want the last 3 buttons to be in a newline. I am using pack and not grid. Need help on this.

Pasting the code

#### Label & Entry creation to select the test path $frm_name = $fsdb_tab -> Frame()->pack(-side => 'left', -fill => ' +both', -anchor => 'n'); $lab = $frm_name -> Label(-text=>"TEST PATH:")->pack(-side => 'lef +t'); $ent = $frm_name -> Entry(-width=>80)->pack(-side => 'left'); $ent->focus; #GUI building for Browser push buttons $but= $frm_name -> Button( -text=>"Browse", -command =>\&browser_button, -activebackground => 'lightblue', -activeforeground => 'black', -relief => 'raised', -borderwidth =>8 )->pack(-side => 'right'); #### Button for "Run FSDB" $final_frame = $fsdb_tab -> Frame(-borderwidth => '5', -relief => +'ridge')->pack(); $run_fsdb = $final_frame -> Button( -text=>"Run FSDB", -command => \&run_fsdb, -activebackground => 'lightblue', -activeforeground => 'black', -relief => 'raised', -borderwidth => 8, -width => 10 )->pack(-side => 'left', -expand => 0); #### Button for "Refresh" $refresh_frame = $fsdb_tab -> Frame(-borderwidth => '5', -relief = +> 'ridge')->pack(); $refresh_fsdb = $refresh_frame -> Button( -text=>"Refresh", -command => \&refresh_fsdb, -activebackground => 'lightblue', -activeforeground => 'black', -relief => 'raised', -borderwidth => 8, -width => 10 )->pack(-side => 'left', -expand => 0); #### Button for "EXIT" $exit_frame = $fsdb_tab -> Frame(-borderwidth => '5', -relief => ' +ridge')->pack(); $exit_fsdb = $exit_frame -> Button( -text=>"EXIT", -command => sub { $mw->destroy; exit; }, -activebackground => 'lightblue', -activeforeground => 'black', -relief => 'raised', -borderwidth => 10, -width => 10 )->pack(-side => 'right');
Sammy..

In reply to Regarding Perl/Tk by sammy_01

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.