FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.14] gh-76607: Improve documentation of the tkinter cursor option (GH-152481) by miss-islington · Pull Request #153111 · python/cpython · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
14 changes: 10 additions & 4 deletions Doc/library/tkinter.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,8 @@ Here are some examples of typical usage::
myapp.mainloop()


.. _Tk-option-data-types:

Tk option data types
^^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -769,12 +771,16 @@ color
represent any legal hex digit. See page 160 of Ousterhout's book for details.

cursor
The standard X cursor names from :file:`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.
The name of the mouse cursor to display while the pointer is over the widget.
Tk provides a portable set of cursor names available on all platforms
(for example ``"arrow"``, ``"watch"``, ``"cross"``, or ``"hand2"``);
the standard X cursor names from :file:`cursorfont.h` may also be used,
without the ``XC_`` prefix (so ``XC_hand2`` becomes ``"hand2"``).
The full list of names, including the platform-specific ones,
is given in the :manpage:`cursors(3tk)` manual page.
You can also specify a bitmap and mask file of your own.
On Windows a cursor file (:file:`.cur` or :file:`.ani`) may be used directly,
giving its path preceded with an ``@``, as in ``"@C:/cursors/bart.ani"``.
See page 179 of Ousterhout's book.

distance
Screen distances can be specified in either pixels or absolute distances.
Expand Down
7 changes: 4 additions & 3 deletions Doc/library/tkinter.ttk.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,10 @@ All the :mod:`!ttk` Widgets accept the following options:
| | read-only, and may only be specified when the window is |
| | created. |
+-----------+--------------------------------------------------------------+
| cursor | Specifies the mouse cursor to be used for the widget. If set |
| | to the empty string (the default), the cursor is inherited |
| | from the parent widget. |
| cursor | Specifies the mouse cursor to be used for the widget. See |
| | the *cursor* option type under :ref:`Tk-option-data-types`. |
| | If set to the empty string (the default), the cursor is |
| | inherited from the parent widget. |
+-----------+--------------------------------------------------------------+
| takefocus | Determines whether the window accepts the focus during |
| | keyboard traversal. 0, 1 or an empty string is returned. |
Expand Down
Loading

Back | FazBrowse Home | New Git URL