| Ticket UUID: | 2e07480f5f43ecaf67a8eeb40325a125779cb188 | |||
| Title: | ttk::spinbox needs to document <MouseWheel> binding | |||
| Type: | Bug | Version: | 8.6.10 | |
| Submitter: | anonymous | Created on: | 2020-05-28 03:27:28 | |
| Subsystem: | 88. Themed Tk | Assigned To: | nobody | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Open | Last Modified: | 2020-06-23 21:58:49 | |
| Resolution: | None | Closed By: | nobody | |
| Closed on: | ||||
| Description: |
The manual for ttk::spinbox does not list the additional binding for the Mouse Wheel. Presumably, it is depending on ttk::entry's manual section on default bindings to suffice. In addition, since the Mouse Wheel does not need focus to work on a widget, rather it sends its events to the widget under the mouse pointer, it is possible for a user to accidentally change a ttk::spinbox while trying to scroll in some other window. For that reason, the programmer might wish to disable the wheel behavior. I propose that an additional section on "default bindings" be added to ttk::spinbox manual entry. Here's an example of what I think might be useful: Default Bindings Being an extended ttk::entry widget, ttk::spinbox includes all the default bindings mentioned in ttk::entry, plus the following: 1. Mouse wheel rotates are the same as pressing <Up> and <Down>. In addition, a mouse with a tilt wheel found on some hardware acts like a shift rotate. If this is not desired, the following can be used for a ttk::spinbox named .spin to disable this behavior: bind .spin <MouseWheel> break The following will leave the mouse wheel rotate active but disable the tilt-wheel or the wheel with the shift key down. bind .spin <Shift-MouseWheel> break 2... (if there's any others that differ from ttk::entry, otherwise numbering not needed) | |||
| User Comments: |
bll added on 2020-06-23 21:58:49:
There are some mouse bindings that could be fixed also. See: https://core.tcl-lang.org/tk/info/8f2c972b3abc8531 fvogel added on 2020-06-23 20:34:08: In reality there are several differences in the bindings between ttk::entry and ttk::spinbox, not just the added MouseWheel. One cannot just say "ttk::spinbox includes all the default bindings mentioned in ttk::entry, plus [...]". Try for yourself by fiddling with text in the two following widgets: package require Tk pack [ttk::spinbox .s -from 1 -to 100] pack [ttk::entry .e] Apart from MouseWheel here are the differences I have found by testing on a Windows box. The ttk::entry text from the "Default bindings" section in the man mage is the bulleted text; the ttk::spinbox would be the --> text; and italics denotes a comment:
--> Double-clicking with mouse button 1 selects all of the text in the spinbox and positions the insert cursor at the end of the line.
--> Feature does not exist for ttk::spinbox
--> The ends of the selection can be adjusted by dragging with mouse button 1 while the Shift key is down.
--> Control-b and Control-f do nothing in both ttk::entry and ttk::spinbox
--> Control-a does not move the insert cursor but selects all text, in both ttk::entry and ttk::spinbox
--> Control-e does nothing in both ttk::entry and ttk::spinbox
fvogel added on 2020-05-28 20:23:11: Reference of the full discussion on comp.lang.tcl. | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki