in reply to Regarding Perl/Tk
Your problem description is rather vague. Is this what you were after?
(By the way, it is helpful to provide a COMPLETE, RUNNABLE example of your code so people don't have to fill in the boilerplate just to look at what you are trying to do.)
UPDATE: Er... removed spurious message code from example. Copy/paste error :/
use strict; use warnings; use Tk; my $mw = MainWindow->new; my $fsdb_tab = $mw->Frame()->pack( -expand => 1, -fill => 'both' ) +; my $button_frame = $mw->Frame()->pack( -expand => 1, -fill => 'x' ); #### Label & Entry creation to select the test path my $frm_name = $fsdb_tab->Frame()->pack( -side => 'left', -fill => 'bo +th', -anchor => 'n' ); my $lab = $frm_name->Label( -text => "TEST PATH:" )->pack( -side => 'l +eft' ); my $ent = $frm_name->Entry( -width => 80 )->pack( -side => 'left' ); $ent->focus; #GUI building for Browser push buttons my $but = $frm_name->Button( -text => "Browse", -command => \&browser_button, -activebackground => 'lightblue', -activeforeground => 'black', -relief => 'raised', -borderwidth => 8 )->pack( -side => 'right' ); #### Button for "Run FSDB" my $final_frame = $button_frame->Frame( -borderwidth => '5', -relief => 'ridge' ) ->grid( -row => 0, -column => 0 ); my $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" my $refresh_frame = $button_frame->Frame( -borderwidth => '5', -relief => 'ridge' ) ->grid( -row => 0, -column => 1 ); my $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" my $exit_frame = $button_frame->Frame( -borderwidth => '5', -relief => 'ridge' )->grid( -row => 0, -column => 2 ); my $exit_fsdb = $exit_frame->Button( -text => "EXIT", -command => sub { $mw->destroy; exit; }, -activebackground => 'lightblue', -activeforeground => 'black', -relief => 'raised', -borderwidth => 8, -width => 10 )->pack( -side => 'right' ); MainLoop;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Regarding Perl/Tk
by sammy_01 (Initiate) on Jun 27, 2013 at 05:21 UTC | |
by Anonymous Monk on Jun 27, 2013 at 07:40 UTC |