Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Here is the complete code. Click on the "FSDB Configuration" tab.

Here i am unable to get the 3 button's in a new line

#!/usr/bin/perl use Tk; use Tk::Text; use Tk::BrowseEntry; use Tk::DirTree; use Tk::NoteBook; use File::Basename; my %manager_hash = ( "all" => "Sheet 2", "fsdb" => "Sheet 3", ); ###################################################################### +################## ##################################### MAIN GUI ###################### +################## ###################################################################### +################## my $mw = MainWindow->new(-title=>"FSDB And Manager Launcher"); $mw->geometry( "900x270" ); #### Creating the tabs in the GUI my $book = $mw->NoteBook()->pack( -fill=>'both', -expand=>1 ); my $select = $book->add( "Sheet 1", -label=>"Manager Selection", -crea +tecmd=>\&create_managerTab ); my $all_tab = $book->add( "Sheet 2", -label=>"All configuration", -cre +atecmd=>\&getAllTab, -state=> 'normal' ); my $fsdb_tab = $book->add( "Sheet 3", -label=>"FSDB configuration", -c +reatecmd=>\&getMainTab, -state=>'normal' ); MainLoop; ###################################################################### +################## ##################################### GUI Functions ################## +################## ###################################################################### +################## sub create_managerTab { #### Radio buttons for Manager selection $frm_manager = $select -> Frame(-borderwidth => '3', -relief => 'r +idge') ->pack(); $lbl_manager = $frm_manager-> Label(-text=>"SELECT THE MANAGER'S T +O RUN: ")->pack(-side => 'left'); $manager = "all"; $rd_all = $frm_manager -> Radiobutton(-text=>"All", -value=>"all", -variable=>\$manager)->pack(-side => 'left' +, -expand => 'y'); $rd_fsdb = $frm_manager -> Radiobutton(-text=>"FSDB", -value=>"fsdb", -variable=>\$manager)->pack(-side => 'left +', -expand => 'y'); $select->Button( -text=>'OK', -command=>\&enableTab, -font => 'Times 12', -activebackground => 'lightblue', -activeforeground => 'black', -relief => 'raised', -width => 20, -borderwidth => 5)->pack(); $select->Button( -text=>'Exit', -command=>sub { $mw->destroy; exit; }, -font => 'Times 12', -activebackground => 'lightblue', -activeforeground => 'black', -relief => 'raised', -width => 20, -borderwidth => 5 )->pack(); } ################################################################# # This function is used to enable/popup the perticluar tab # # selected in the "Manager selection" tab # ################################################################# sub enableTab { print "MANAGER ===> $manager\n"; $book->raise("$manager_hash{$manager}"); } sub getMainTab { #### 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 Re^2: Regarding Perl/Tk by sammy_01
in thread 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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others avoiding work at the Monastery: (6)
    As of 2014-08-02 01:17 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Who would be the most fun to work for?















      Results (53 votes), past polls