perl 在tk中的回调函数 参数为一个函数的引用

 
 
my (@frames,@button);
	my %sub_of = (
    "日志查询" => \&push_button2 ,
        "短信查询" => \&push_button3 ,
        "VIEW DISK" => \&push_button4 ,
        4 => sub{ print "program 4" },
        5 => sub{ print "program 5" },
        6 => sub{ print "program 6" },
        7 => sub{ print "program 7" },
        8 => sub{ print "program 8" },
        9 => sub{ print "program 9" },
);

 $but2 = $frm_name1 -> Button(-text => "导出数据",-command =>\&sub_exp)-> pack(-side=>"left",-ipadx=>20,-padx=>30);  
  


猜你喜欢

转载自blog.csdn.net/zhaoyangjian724/article/details/80091547