You elders are saving lives! :) Here is another one, that is beyond my scope:

In my almost 1k line megaproject I have this area where additional lines of code should appear in my script. I have this Radiobuttons area where if values 1 and 4 are selected more Optionmenus should appear. Is this possible?

my $acc_type_frame = $tab2->Frame()->pack(-side=>'top', -anchor=>'nw', + -padx=>'15'); #tab 2 $acc_type_frame->Label(-font => 'tab_rus_bold', -text => '&#10 +58;ип АКБ:') ->pack(-side=>'left'); #define EE_LCD_AccType 0- &#105 +0;ислотный Р&#1 +077;г, 1- Гелевый/AGM + T , 2- Кислотны&#108 +1; T, //3- Щелочной $acc_type_frame->Radiobutton(-font => 'tab_rus', -text => '&#1 +050;ислотный Р& +#1077;г', -value => '0', -variable => \$acc_type, -command => +sub {&write_map('384','0')}) ->pack(-side=>'left'); $acc_type_frame->Radiobutton(-font => 'tab_rus', -text => '&#1 +043;елевый/AGM T', -value => '1', + -variable => \$acc_type, -command => sub {&write_map('384','1')}) ->pack(-side=>'left'); $acc_type_frame->Radiobutton(-font => 'tab_rus', -text => '&#1 +050;ислотный Т' +, -value => '2', -variable => \$acc_type, -command => sub {&write_map +('384','2')}) ->pack(-side=>'left'); $acc_type_frame->Radiobutton(-font => 'tab_rus', -text => '&#1 +065;елочной', -value => '3' +, -variable => \$acc_type, -command => sub {&write_map('384','3')}) ->pack(-side=>'left'); &extra_acc_vals($tab2, $acc_type_frame) if (($acc_type==0 ) || + ($acc_type==3));

This last sub calls the code for more option menus...

Very gratefull to all you!


In reply to Dynamically add Optionmenus based on variable perl tk by pashanoid

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.