Dear Fellow Monks
I have this top-level form that contains a number of radio buttons and an OK button. How can get this frame to disappear once a radio button selection was made and the ok button was pressed?
I have tried ‘destroy’ but it only clears the contents on the frame rather than getting rid of it completely.
Can some one please help me? And many thanks indeed.
my $toplevel = $tk{mw}-> Toplevel; my $top_frame = $toplevel-> Frame; my $folder_level; my $subfolder_level; my $frame_label = $top_frame-> Label(-text=> 'Please select the AC +E permission type'); my @pl = qw/-side top -pady 2 -anchor w/; $top_frame-> pack (@pl); foreach my $p ('No Access', 'List', 'Read', 'Add' ,'Add & Read', ' +Change','Full Controll','Special Directory Accesss','Special File Acc +ess') { $top_frame->Radiobutton( -text => "ACE : $p", -variable => \ + $folder_level, -relief => ' +flat', -value => $ +p, )->pack(@pl); + } my $ok_buttn = $top_frame-> Button(-text=>'OK', -borderwid +t=>5, -width=>10 +, -command=> + sub{print "\n$folder_level\n"; + $top_frame->distroy; } )-> pack;

In reply to How to get rid of a TopLevel window by blackadder

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.