g_speran has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use Tk; use Tk::SplitFrame; use Tk::LabEntry; use Tk::LabFrame; use Tk::ErrorDialog; use Tk::NoteBook; #use Tk::Label; &maingui; sub maingui { my $MainWindow = MainWindow->new(-title=>'Split Window Example'); my $SplitFrame = $MainWindow->SplitFrame ( '-orientation' => 'vertical', '-trimcolor' => '#c7c7c7', '-background' => 'white', '-sliderposition' => 100, '-borderwidth' => 2, '-sliderwidth' => 7, '-relief' => 'sunken', '-height' => 1000, '-width' => 1000, '-padbefore' => 0, '-padafter' => 0 ); # Values shown above are defaults. my $LeftLabel = $SplitFrame->Label ('-text' => 'Left'); my $RightLabel = $SplitFrame->Label ('-text' => 'Right'); $SplitFrame->pack (-expand => 'true', -fill => 'both'); $SplitFrame->configure ('-sliderposition' => 100); ################################################################### +########### ## Right Side of the Split Frame + ## ################################################################### +########### my $nb = $RightLabel->NoteBook()->pack(-expand=>1,-fill=>'both'); my $tab_1 = $nb->add('one', -label => '1.'); my $tab_2= $nb->add('two', -label => '2. '); my $tab_3 = $nb->add('three', -label => '3. '); ################################################################### +########### ## Tab 1 ## ################################################################### +########### my $startday; my $starthour; my $endday; my $endhour; my $chkoptions; my $frm1 = $tab_1->Frame(-relief=>'groove', -label=>'SOme text here', -borderwidth=>2, )->pack(-side=>'top',-anchor=>'nw',-fill=>'both'); my $frm_start = $tab_1->LabFrame(-relief=>'groove', -label=>'question here?', -labelside=>'acrosstop', )->pack(-side=>'top', -anchor=>'nw', -fill=>'both' ); my $label1 = $frm_start -> Label(-text => 'Between ' ) -> pack(-side => 'left' , -pady =>3 ); my $startday_e= $frm_start->LabEntry(-label=>' day(s) ', -labelPack=> [qw/-side right/], -background=> 'white', -textvariable=> \$startday, -width=>10, )->pack(-side=>'left', -pady=>3, ); my $starthour_e= $frm_start->LabEntry(-label=>' hour(s) and ', -labelPack=> [qw/-side right/], -background=> 'white', -textvariable=> \$starthour, -width=>10, )->pack(-side=>'left', -pady=>3, ); MainLoop; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl/Tk - UI disappears
by ldln (Pilgrim) on Mar 21, 2008 at 02:38 UTC | |
|
Re: Perl/Tk - UI disappears
by halfcountplus (Hermit) on Mar 21, 2008 at 00:03 UTC | |
|
Re: Perl/Tk - UI disappears
by zentara (Cardinal) on Mar 21, 2008 at 15:26 UTC |