F
f1crazed
Hello,
I am new to using tk and perl. What I am trying to do below is just
get the label and text boxes to line up on the left side and top of
the mainwindow. It seems that there is some kind of padding on the
left side and top of the window that won't allow me to put widgets all
the way on the left and top of the window.
Here is the code:
#!/usr/bin/perl -w
use Tk;
use strict;
my $mw = new MainWindow(); # Main Window
$mw->geometry("400x200+500+400");
$mw->title("Learning Grid");
$mw -> Label(-text=> "hello") -> grid(-row=>0, -column=>0, -sticky =>
'w', );
my $txt = $mw-> Text(-width=>20, -height=>1)-> grid(-row=>2, -
column=>0, -sticky => 'w') ;
my $txt2 = $mw-> Text(-width=>20, -height=>1)-> grid(-row=>3, -
column=>0, -sticky => 'w');
MainLoop;
Thanks for any help!
-JD
I am new to using tk and perl. What I am trying to do below is just
get the label and text boxes to line up on the left side and top of
the mainwindow. It seems that there is some kind of padding on the
left side and top of the window that won't allow me to put widgets all
the way on the left and top of the window.
Here is the code:
#!/usr/bin/perl -w
use Tk;
use strict;
my $mw = new MainWindow(); # Main Window
$mw->geometry("400x200+500+400");
$mw->title("Learning Grid");
$mw -> Label(-text=> "hello") -> grid(-row=>0, -column=>0, -sticky =>
'w', );
my $txt = $mw-> Text(-width=>20, -height=>1)-> grid(-row=>2, -
column=>0, -sticky => 'w') ;
my $txt2 = $mw-> Text(-width=>20, -height=>1)-> grid(-row=>3, -
column=>0, -sticky => 'w');
MainLoop;
Thanks for any help!
-JD