Python 3 - Tkinter 游标
-
简述
Python Tkinter 支持相当多的可用鼠标光标。确切的图形可能因您的操作系统而异。这是有趣的列表 -- "arrow"
- "circle"
- "clock"
- "cross"
- "dotbox"
- "exchange"
- "fleur"
- "heart"
- "heart"
- "man"
- "mouse"
- "pirate"
- "plus"
- "shuttle"
- "sizing"
- "spider"
- "spraycan"
- "star"
- "target"
- "tcross"
- "trek"
- "watch"
-
例子
通过将光标移动到不同的按钮来尝试以下示例 -# !/usr/bin/python3 from tkinter import * import tkinter top = Tk() B1 = Button(top, text = "circle", relief = RAISED,\ cursor = "circle") B2 = Button(top, text = "plus", relief = RAISED,\ cursor = "plus") B1.pack() B2.pack() top.mainloop()