This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Tkinter: reference document of possible cursor names
Type: Stage: needs patch
Components: Documentation, Tkinter Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: alex.75, docs@python, patthoyts, serhiy.storchaka, terry.reedy
Priority: normal Keywords:

Created on 2017-12-25 22:37 by alex.75, last changed 2022-04-11 14:58 by admin.

Messages (5)
msg309045 - (view) Author: Alessandro Piccione (alex.75) Date: 2017-12-25 22:37
In the documentation of Tkinter.ttk Widget it is defined the "cursor" parameter. It is:
cursor	
Specifies the mouse cursor to be used for the widget. If set to the empty string (the default), the cursor is inherited for the parent widget.

There is not ANY way to knok wich value this parameter accept.
Searching "cursor" in the documentation does not find nothing, apart database cursor and this page (Tkinter.ttk.Widget).

Thanks,

Alessandro
msg309210 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-12-30 00:09
The tkinter docs currently omit much, but refer one to, among other places, http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html, which has a page with images and names.
http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/cursors.html
msg380813 - (view) Author: Pat Thoyts (patthoyts) Date: 2020-11-12 11:04
The Tk documentation for the acceptable cursor names is the cursors manual page. https://www.tcl.tk/man/tcl/TkCmd/cursors.htm

Tk does not provide a way to get all these names in script.

This should probably be closed.
msg380815 - (view) Author: Alessandro Piccione (alex.75) Date: 2020-11-12 11:31
As suggested the documentation for "cursor" is here: https://www.tcl.tk/man/tcl/TkCmd/cursors.htm

Close [SOLVED]
msg380849 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-11-12 21:14
A link here is not a patch.  The current tkinter doc for the cursor option in https://docs.python.org/3/library/tkinter.html#tk-option-data-types badly needs updating.
"""
    The standard X cursor names from cursorfont.h can be used, without the XC_ prefix. For example to get a hand cursor (XC_hand2), use the string "hand2". You can also specify a bitmap and mask file of your own. See page 179 of Ousterhout’s book.
"""

The ttk doc https://docs.python.org/3/library/tkinter.ttk.html#standard-options is, as noted, incomplete.
"Specifies the mouse cursor to be used for the widget. If set to the empty string (the default), the cursor is inherited for the parent widget."


I propose to replace the tkinter entry with a combined and updated entry.
"""
    The name of the cursor to use when the mouse point is over the widget.  An empty string, the default, means to inherit the cursor from the parent widget or the system. "none" means no cursor.  Other names recognized by tk are listed at https://www.tcl.tk/man/tcl/TkCmd/cursors.htm.  Possible forms of the cross-platform cursors are illustrated at https://tkdocs.com/shipman/cursors.html.  The cursor hot spot, the point reported for mouse clicks, depends on the cursor.
"""

I may try to reference this, rather than copy it, in the ttk doc.
History
Date User Action Args
2022-04-11 14:58:56adminsetgithub: 76607
2020-11-12 21:14:46terry.reedysetstatus: closed -> open

resolution: fixed ->

assignee: docs@python
stage: resolved -> needs patch
title: Tkinter.ttk Widget does not define wich option exists to set the cursor -> Tkinter: reference document of possible cursor names
nosy: + docs@python
versions: + Python 3.10, - Python 3.8
messages: + msg380849
components: + Documentation
type: resource usage ->
2020-11-12 11:31:33alex.75setstatus: open -> closed
resolution: fixed
messages: + msg380815

stage: resolved
2020-11-12 11:04:44patthoytssetnosy: + patthoyts
messages: + msg380813
2017-12-30 00:09:14terry.reedysetnosy: + terry.reedy, serhiy.storchaka
messages: + msg309210
2017-12-25 22:37:11alex.75create