-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-111576: Improve documention for tkinter.messagebox #111578
gh-111576: Improve documention for tkinter.messagebox #111578
Conversation
This is only available on macOS. | ||
|
||
*default* | ||
Gives the :ref:`symbolic name <messagebox-buttons>` of the default button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gives the :ref:`symbolic name <messagebox-buttons>` of the default button | |
Gives the :ref:`symbolic name <messagebox-buttons>` of the button initially selected (highlighted) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Tk documentation uses term "selected" not as a synonym of "highlighted" but as "the one selected by the user". Most of documentation are copied from the Tk manpage with small adaptation, it is better to not introduce inconsistencies. The same terminology can be used in other parts of the Tk documentation (for example the default button is mentioned again three lines below).
Doc/library/tkinter.messagebox.rst
Outdated
to be displayed. | ||
|
||
|
||
Returns the symbolic name of the selected button. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns the symbolic name of the selected button. | |
Returns the symbolic name of the selected button, which is the one clicked on or the one highlighted when the Enter key is hit. Change the button selected with the Tab key or arrow keys. |
Could have 🔑 markup, but I forget the details. I am not sure what the truth is for the second sentence. Same on all systems? Others will not know either ;-).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It adds too much details which are not even correct. You can select the button by pressing Space or a shortcut (Alt+the underscored letter). Arrow keys do not change the default button on X Window. Some other keys (e.g Shift-Tab) can change the default button.
Tk uses default behavior on every platform, and it is not a good place to describe it.
When you're done making the requested changes, leave the comment: And if you don't make the requested changes, you will be poked with soft cushions! |
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
…-111578) (cherry picked from commit eaf67e3) Co-authored-by: Serhiy Storchaka <[email protected]>
GH-111597 is a backport of this pull request to the 3.12 branch. |
…-111578) (cherry picked from commit eaf67e3) Co-authored-by: Serhiy Storchaka <[email protected]>
GH-111598 is a backport of this pull request to the 3.11 branch. |
…) (GH-111597) (cherry picked from commit eaf67e3) Co-authored-by: Serhiy Storchaka <[email protected]>
…) (GH-111598) (cherry picked from commit eaf67e3) Co-authored-by: Serhiy Storchaka <[email protected]>
📚 Documentation preview 📚: https://cpython-previews--111578.org.readthedocs.build/