in reply to Re: How to resize mainwindow automatically
in thread How to resize mainwindow automatically
I am using perl\Tk... As of I know for a top-level window , we cant use pack.. Here is the code..which i have written...
# Defines the Main Frame in the Main Window $frame1 = $mainwindow ->Frame(-relief => 'flat', -borderwidth => $fram +e_borderwidth, -background => $mainframes_background , -foreground => $frameforeground +, -width => 475, -height => 320) ->pack(-padx => 10, -pady => 19, -ipadx +=> 80, -ipady => 70);
# Defining the Fuel and Oil Flow Rates - Instrumentation Label $mainwindow ->Label(-text => " Which $Fuel_Type tank are you using + ? ", -background => "DarkBlue", -borderwidth => 0, -foreground => $mainframes_background, -relief => 'gro +ove', -font => [$style , $size, $visibility]) ->pack() ->place(-x => 100, -y => 11);
# Spacer between the frame 1 border and frame2 border $spacer1 = $frame1 ->Frame(-relief =>'flat', -borderwidth => $frame +_borderwidth, -background => $mainframes_background, -foreground +=> $frameforeground, -height => 10) ->pack(-padx => 8, -pady => 0, -ipadx => 0, -ipady => 0 +, -fill => 'x', -side => 'top');
for($i = 1;$i <= $nTanks;$i++){# Creating the frame to hold the controls $frame2 = $frame1->Frame(-relief => 'flat', -borderwidth => 3, + -background => $mainframes_background, -foreground = +> $frameforeground) ->pack(-padx => 8, -pady => 0, -ipadx => 0, -ipady => 0, -fill => 'x', -side => ' +top');
$button = $frame2 -> Button(-text => " OK ", -font=>[$style, $size, $visibility], -command => \&ok_callback); $button -> grid($button,-sticky => 'w',-padx => 10,-pady => 8);$Rb[$i-1] = $frame2 -> Radiobutton(-text => $i,-value => $i,-variable +=> \$Tank_Num, -width => 80, -anchor => 'w', +-background => $mainframes_background, -font => [$style , $size, $vi +sibility]); <code>$Rb[$i-1] -> grid($Rb[$i-1],-sticky => 'w',-padx => 10,-pady => +3); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to resize mainwindow automatically
by zentara (Cardinal) on Oct 26, 2009 at 14:27 UTC | |
|
Re^3: How to resize mainwindow automatically
by Marshall (Canon) on Oct 27, 2009 at 12:42 UTC | |
|
Re^3: How to resize mainwindow automatically
by ch123 (Initiate) on Oct 26, 2009 at 13:51 UTC | |
by biohisham (Priest) on Oct 26, 2009 at 14:40 UTC | |
by Anonymous Monk on Oct 26, 2009 at 14:18 UTC |