Hi I am planing to refresh the window according the value selected in the option window. The code is ################### use Tk; @cm_tools = ("CVS", "VSS", "PVCS", "RCS", "Start Team"); $mw = MainWindow->new(); #$mw->geometry("300x200"); $mw->title("ZenSOFT Configuration Tool"); $mw->Label(-text => "Top", -background => "red")->pack(); $mw->Label(-text=>"CM Tool")-> pack(-expand => '1'); $mw->Optionmenu(-options=>@cm_tools,-textvariable=>\$cm_tool,-width=>'25')->pack(-expand => '1'); if ($cm_tool eq "VSS") { @fruits = ('Apple','Banana','Cherry','Date','Elderberry','Fig'); $fruit_list = $mw->Listbox(); for (@fruits) { $fruit_list -> insert('end',$_); } $fruit_list->pack(); } else { @fruits = ('Apple','Banana'); $fruit_list = $mw->Listbox(); for (@fruits) { $fruit_list -> insert('end',$_); } $fruit_list->pack(); } $EndFrame= $mw ->Frame(-width => '40')->pack(-side => "bottom"); $OkButton = $EndFrame->Button(-text => "Next", -width=>'10', -command => sub{$mw->destroy()})->pack(-padx=>'10',-pady=>'5', -side=>'left'); $CancelButton = $EndFrame->Button(-text => "Cancel", -width=>'10', -command => sub {exit })->pack(-padx=>'10',-pady=>'5', -side=>'right'); MainLoop(); ####################### In the above example i want to refresh the list according to the value selected in the option, in the same window. I am not planning to open new Tk window. Can you please me for the above problem or give me any best way to achieve this

In reply to Re^2: Refresh windows in Perl TK by Anonymous Monk
in thread Refresh windows in Perl TK by Anonymous Monk

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.