pashanoid has asked for the wisdom of the Perl Monks concerning the following question:
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 => '
 +58;ип АКБ:') ->pack(-side=>'left'); #define EE_LCD_AccType 0- i +0;ислотный Р +077;г, 1- Гелевый/AGM + T , 2- Кислотныl +1; T, //3- Щелочной $acc_type_frame->Radiobutton(-font => 'tab_rus', -text => ' +050;ислотный Р& +#1077;г', -value => '0', -variable => \$acc_type, -command => +sub {&write_map('384','0')}) ->pack(-side=>'left'); $acc_type_frame->Radiobutton(-font => 'tab_rus', -text => ' +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 => ' +050;ислотный Т' +, -value => '2', -variable => \$acc_type, -command => sub {&write_map +('384','2')}) ->pack(-side=>'left'); $acc_type_frame->Radiobutton(-font => 'tab_rus', -text => ' +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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dynamically add Optionmenus based on variable perl tk
by Anonymous Monk on Jul 28, 2011 at 09:40 UTC | |
by pashanoid (Scribe) on Jul 28, 2011 at 15:59 UTC | |
|
Re: Dynamically add Optionmenus based on variable perl tk
by TomDLux (Vicar) on Jul 28, 2011 at 14:57 UTC | |
by pashanoid (Scribe) on Jul 28, 2011 at 18:20 UTC | |
by pashanoid (Scribe) on Jul 29, 2011 at 08:15 UTC | |
by Anonymous Monk on Dec 07, 2011 at 23:03 UTC |