Sorry about that one... I have a Radiobutton with 4 options. If a user selects option 2, everything is fine, a subroutine writes some value to where it supposed to write it and all is well. However, If she selects option 1, well, that subroutine should do the same thing AND another Option menu should appear with more choices because that particular radiobutton needs more info associated with it... Now, I'm not writting the code for the Optionmenu, presuming the subroutine &extra_acc_vals will generate it. And it does, but I have to select button 1, then close out this window with the Radiobuttons. Then hit a button that opens it again, and THEN these extra Optionmenus appear. I really appreciate your help on this one!!!

my $acc_type_frame = $tab2->Frame()->pack(-side=>'top', -anchor=>'nw', + -padx=>'15'); #tab 2 $acc_type_frame->Label(-font => 'tab_rus_bold', -text => 'some + text 1') ->pack(-side=>'left'); $acc_type_frame->Radiobutton(-font => 'tab_rus', -text => 'Val +ue 0 if checked &extra_acc_vals should generate Optionmenus below', - +value => '0', -variable => \$acc_type, -command => sub {&write_map(' +384','0') #these commands should be executed firs/as well}) ->pack(-s +ide=>'left'); $acc_type_frame->Radiobutton(-font => 'tab_rus', -text => 'Val +ue 1 if checked no extra Optionmenus should appear', -value => '1', - +variable => \$acc_type, -command => sub {&write_map('384','1')})->pac +k(-side=>'left'); $acc_type_frame->Radiobutton(-font => 'tab_rus', -text => 'Val +ue 1 if checked no extra Optionmenus should appear', -value => '2', - +variable => \$acc_type, -command => sub {&write_map('384','2')}) ->pack(-side=>'left'); $acc_type_frame->Radiobutton(-font => 'tab_rus', -text => 'Val +ue 0 if checked &extra_acc_vals should generate Optionmenus below', - +value => '3', -variable => \$acc_type, -command => sub {&write_map('3 +84','3')}) ->pack(-side=>'left'); &extra_acc_vals($tab2, $acc_type_frame) if (($acc_type==0 ) || + ($acc_type==3)); #so if $acc_type is iether 0 or 3 the &extra_acc_va +ls should generate OptionMenus and such

In reply to Re^2: Dynamically add Optionmenus based on variable perl tk by pashanoid
in thread 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.