my $reg=$top->Entry(width=>30, -font=>12, -textvariable=>\$regex, -validatecommand=>\&setting, -validate=>'all', )->pack(); #### my $i=$frame1->Checkbutton( -bg=>COLOR, -text=>'Ignore Case (i)', -command=>\&global, -activebackground=>COLOR, -onvalue=>'i', -offvalue=>' ', -variable=>\$i_status, -font=>'code12', -justify=>'left', -state=>$state, )->pack( -side=>'left', ); #### sub setting{ if (substr($regex,0,2)eq 'tr') {$state='disabled'} else {$state='active'}; }