wwe has asked for the wisdom of the Perl Monks concerning the following question:
This is what i get now:-- |5 | Enter the number of daily log files to copy -- -- |5 | Enter the number of audit log files to copy --
-- |5 | Enter the number of + daily log files to copy -- -- |5 | Enter the number of audit log files to copy --
use Modern::Perl; use Tk; my %config = ( numberOfDailyLogsToCopy => 5, numberOfAuditLogsToCopy => 5, ); my $mainWindow = MainWindow->new( -title => "main window", ); my $chkboxFrame = $mainWindow -> Frame( -borderwidth => 2, ) +->pack( -anchor => 'w', ); my $entryDailyLogs = $chkboxFrame -> Entry( -textvariable => \$config{'numberOfDailyLo +gsToCopy'}, -width => 2, ) -> pack( -anchor => 'w',); my $entryDailyLogsText = $chkboxFrame -> Label( -text => 'Enter the number of daily log fi +les to copy', ) -> pack( -before => $entryDailyLogs, -si +de => 'right' ); my $entryAuditLogs = $chkboxFrame -> Entry( -textvariable =>\$config{'numberOfAuditLog +sToCopy'}, -width => 2, ) -> pack( -anchor => 'w', ); my $entryAuditLogsText = $chkboxFrame -> Label( -text => 'Enter the number of audit log fi +les to copy', ) -> pack( -before => $entryAuditLogs, -si +de => 'right'); MainLoop;
use Modern::Perl; use Tk; my %config = ( numberOfDailyLogsToCopy => 5, numberOfAuditLogsToCopy => 5, ); my $mainWindow = MainWindow->new( -title => "main window", ); my $dailyFrame = $mainWindow -> Frame( -borderwidth => 2, ) - +>pack(); my $entryDailyLogs = $dailyFrame -> Entry( -textvariable => \$config{'numberOfDailyLo +gsToCopy'}, -width => 2, ) -> pack( -side => 'left', -anchor => 'w' +); my $entryDailyLogsText = $dailyFrame -> Label( -text => 'Enter the number of daily log fi +les to copy', ) -> pack( -side => 'left' ); my $auditFrame = $mainWindow -> Frame( -borderwidth => 2, + ) ->pack(); my $entryAuditLogs = $auditFrame -> Entry( -textvariable =>\$config{'numberOfAuditLog +sToCopy'}, -width => 2, ) -> pack( -side => 'left', -anchor => 'w' + ); my $entryAuditLogsText = $auditFrame -> Label( -text => 'Enter the number of audit log fi +les to copy', ) -> pack( -side => 'left' ); MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: TK positioning of elements
by lamprecht (Friar) on May 21, 2010 at 12:37 UTC | |
|
Re: TK positioning of elements
by Marshall (Canon) on May 21, 2010 at 14:02 UTC | |
by wwe (Friar) on May 25, 2010 at 08:09 UTC | |
|
Re: TK positioning of elements
by Anonymous Monk on May 21, 2010 at 11:25 UTC |