Message271481
I am not trying to re-invent the wheel. I am trying to bring IDLE up to uniform standards. In particular, make all dialogs usable from the keyboard. The config dialog is the worst. See #27620, the master issue.
For a two button messagebox, I went back to 3.5.2, which still uses the commondialog box. It has the default button marked as such. <Return> always does the default action. <Escape> always cancels. <Tab> moves the focus, but does not affect the above. <Space> enters ' ' in text entry and 'clicks' buttons. So this is at least 'a' Windows standard, as well as 'a' Mac standard.
The search dialogs act the same. The space behavior built-in to the TK widgets, at least on Windows. I presume this is a class binding. The dialogs have no platform specific code, so they are also the defacto IDLE standard.
Serhiy, it is definitely a tk convention, and I presume more universal than that, that the 'default ring' always indicate what button/action is invoked by <Return>. If the default moved with the focus, the default ring should move also. I am not inclined to do that without a strong reason.
The button default ring is controlled by the 'default' option" 'active' = visible, 'normal' = possible, 'disabled' = not possible. (From the tk docs. The NMT reference is useless here.) I will add "default='active'" for the Ok button.
(Mark: "default=1", suggested on http://www.tkdocs.com/widgets/button.html, is a nasty bug. "_tkinter.TclError: bad default "1": must be normal, active, or disabled".) |
|
Date |
User |
Action |
Args |
2016-07-28 01:46:17 | terry.reedy | set | recipients:
+ terry.reedy, steven.daprano, markroseman, serhiy.storchaka |
2016-07-28 01:46:17 | terry.reedy | set | messageid: <1469670377.85.0.959624889121.issue27621@psf.upfronthosting.co.za> |
2016-07-28 01:46:17 | terry.reedy | link | issue27621 messages |
2016-07-28 01:46:16 | terry.reedy | create | |
|