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 => 'Value 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(-side=>'left'); $acc_type_frame->Radiobutton(-font => 'tab_rus', -text => 'Value 1 if checked no extra Optionmenus should appear', -value => '1', -variable => \$acc_type, -command => sub {&write_map('384','1')})->pack(-side=>'left'); $acc_type_frame->Radiobutton(-font => 'tab_rus', -text => 'Value 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 => 'Value 0 if checked &extra_acc_vals should generate Optionmenus below', -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)); #so if $acc_type is iether 0 or 3 the &extra_acc_vals should generate OptionMenus and such