相关疑难解决方法(0)

按下按钮时有多个命令

我想在单击按钮时运行多个功能.例如,我希望我的按钮看起来像

self.testButton = Button(self, text = "test", 
                         command = func1(), command = func2())
Run Code Online (Sandbox Code Playgroud)

当我执行这个语句时,我得到一个错误,因为我不能两次为一个参数分配一些东西.如何让命令执行多个功能.

python command tkinter button python-2.7

9
推荐指数
5
解决办法
7万
查看次数

标签 统计

button ×1

command ×1

python ×1

python-2.7 ×1

tkinter ×1