Tkinter Cursors:
 
Python的Tkinter的支持很多不同的鼠标光标的数字。确切的图形可能会有所不同,根据您的操作系统.

这里是大量有趣的的名单:

  • "arrow"

  • "circle"

  • "clock"

  • "cross"

  • "dotbox"

  • "exchange"

  • "fleur"

  • "heart"

  • "heart"

  • "man"

  • "mouse"

  • "pirate"

  • "plus"

  • "shuttle"

  • "sizing"

  • "spider"

  • "spraycan"

  • "star"

  • "target"

  • "tcross"

  • "trek"

  • "watch"

例子:

尝试下面的例子,在不同的按钮光标移动:

from Tkinter import *
import Tkinter top = Tkinter.Tk() B1 = Tkinter.Button(top, text ="circle", relief=RAISED,\
cursor="circle")
B2 = Tkinter.Button(top, text ="plus", relief=RAISED,\
cursor="plus")
B1.pack()
B2.pack()
top.mainloop()
 
 
05-11 14:03