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');
# 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');
for($i = 1;$i <= $nTanks;$i++){
$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);
}
$button = $frame2 -> Button(-text => " OK ", -font=>[$style, $size, $visibility], -command => \&ok_callback);
$button -> grid($button,-sticky => 'w',-padx => 10,-pady => 8); |