Issue 31422: tkinter.messagebox and tkinter.filedialog don't show default button's keyboard shortcuts (original) (raw)

Created on 2017-09-11 17:38 by jcrmatos, last changed 2022-04-11 14:58 by admin.

Messages (8)
msg301893 - (view) Author: (jcrmatos) * Date: 2017-09-11 17:38
tkinter.messagebox windows (eg. askokcancel, showerror, showinfo, ...) in Tkinter 8.6 running on Python 3.5.3, don't don't show the keyboard shortcuts/accelerators in the default buttons. And the askopenfilename from tkinter.filedialog only shows the Open one. The Cancel does not appear and does not work. I'm using it under Windows 7 Pro.
msg302280 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-09-15 17:41
Not showing shortcuts is not a bug in the strick sense used on the tracker. Please be more specific about what it is that is not working.
msg302282 - (view) Author: (jcrmatos) * Date: 2017-09-15 18:03
Hello, I can't be more specific. The problem is that the tkinter.messagebox windows (askokcancel, askyesno, showerror, showinfo, etc.) default buttons (Ok, Cancel, Yes, No, etc.) don't show the default keyboard shortcuts/accelerators. I believe they should. Is it an incorrect assumpption? Thanks, JM
msg303167 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-09-27 18:28
Would be help if you provide a minimal script that exposes the problem.
msg303170 - (view) Author: (jcrmatos) * Date: 2017-09-27 19:13
Hello, Here it is. from tkinter import Tk from tkinter.messagebox import askokcancel, showerror master=Tk() showerror('Error', 'Error message', parent=master) a = askokcancel('Error', 'Error message', parent=master) master.mainloop() Best regards, JM
msg303172 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-09-27 19:31
These are standard Tk widgets. Tkinter is not responsible for the look and feel of them. It just call the Tk command tk_messageBox with corresponding parameters [1]. [1] https://www.tcl.tk/man/tcl8.6/TkCmd/messageBox.htm
msg303181 - (view) Author: (jcrmatos) * Date: 2017-09-27 21:27
Hello, There are no parameters for the buttons. There is a difference in behaviour between messagebox windows (no shortcuts at all) to askopenfilename from tkinter.filedialog where the Open button has teh shortcut (but the Cancel one doesn't). Best regards, JM
msg303191 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-09-28 04:31
jcr: 3.5 only gets security fixes. If this issue does not apply to 3.6 or 3.7, this should be closed. When core developers (snake after name) change the headers, you should assume that they know what they are doing and not change them back.
History
Date User Action Args
2022-04-11 14:58:52 admin set github: 75603
2017-09-28 04:32:02 terry.reedy set versions: - Python 3.5
2017-09-28 04:31:44 terry.reedy set messages: +
2017-09-27 21:27:13 jcrmatos set messages: +
2017-09-27 19:31:58 serhiy.storchaka set messages: +
2017-09-27 19:13:24 jcrmatos set messages: +
2017-09-27 18:28:59 serhiy.storchaka set messages: +
2017-09-27 17:11:24 jcrmatos set versions: + Python 3.5, - Python 3.7
2017-09-15 18:03:54 jcrmatos set messages: +
2017-09-15 17:41:00 terry.reedy set versions: + Python 3.7, - Python 3.5nosy: + terry.reedy, serhiy.storchakamessages: + type: behavior -> enhancement
2017-09-11 17:38:18 jcrmatos create