小编zef*_*cka的帖子

当您将鼠标悬停在按钮图像上时更改按钮图像 tkinter

将鼠标悬停在按钮上时如何更改图像?我需要当你将鼠标悬停在按钮 1 或 2 上时图片会发生变化:

Photo1 = (file='Image\ProgrammingButton') 
Photo2 = (file='Image\DesignButton')  
But1 = (root, image=Photo1) 
But2 = (root, image=Photo2)
Run Code Online (Sandbox Code Playgroud)

悬停时

Photo1 = (file='Image\ActiveProgrammingButton') 
Photo2 = (file='Image\ActiveDesignButton')
Run Code Online (Sandbox Code Playgroud)

python tkinter python-3.x

0
推荐指数
1
解决办法
1740
查看次数

标签 统计

python ×1

python-3.x ×1

tkinter ×1