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);

In reply to Re^2: How to resize mainwindow automatically by ch123
in thread How to resize mainwindow automatically by ch123

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.