学习笔记 | tkinter 鼠标形状cursor属性值一览 设置鼠标悬停样式 光标形状属性设置

Python tkinter 鼠标形状cursor属性值

属性 效果 属性 效果
arrow
arrow
pirate
pirate
circle
circle
plus
plus
clock
clock
shuttle
shauttle
cross
cross
sizing
sizing
dotbox
dotbox
spider
spider
exchange
exchange
spraycan
spraycan
fleur
fleur
star
star
hand2
hand2
target
target
heart
heart
tcross
tcross
man
man
trek
trek
mouse
mouse
watch
watch

附:cursor图形实时展示器:

#tkinter cursor值展示
import tkinter as tk

root = tk.Tk(className='cursor值')

for i in ['arrow','circle','clock','cross','dotbox',
          'exchange','fleur','hand2','heart','man','mouse',
          'pirate','plus','shuttle','sizing','spider',
          'spraycan','star','target','tcross','trek','watch']:
    tk.Label(root,text=i,cursor=i,relief='solid').pack(side='top',fill='x')

root.mainloop()

效果:
[图片上传失败...(image-e33af1-1627292716556)]
以上就是Python中tkinter的鼠标形状cursor属性值汇总,
作者整理不易,如果对你有用的话,
点个赞加个收藏和关注再走吧!

CSDN同名搜 H_612,看更多Python文章
CSDN博客:https://blog.csdn.net/weixin_52132159

你可能感兴趣的:(学习笔记 | tkinter 鼠标形状cursor属性值一览 设置鼠标悬停样式 光标形状属性设置)