|
From: Jeff H. <je...@Ac...> - 2005-03-20 20:19:27
|
> The convention on X11 (which Tk follows) is that mousewheel=20 > events are delivered to the window under the mouse pointer,=20 > not the one with keyboard focus. >=20 > With this model, comboboxes are less likely to be=20 > accidentally mousewheeled; OTOH, it also makes combobox=20 > mousewheel bindings somewhat less useful. >=20 > I thought there was talk of making Tk on Windows work the > same way (i.e., mousewheel events follow pointer instead > of focus) -- what became of that? http://www.tcl.tk/cgi-bin/tct/tip/171.html "Instead of requiring a widget to have [focus] to receive MouseWheel = events, the new proposal operates with MouseWheel as a global binding. When = fired, it first does a safety check to prevent double-firing if an existing = MouseWheel binding is on the widget. It then finds the widget which the mouse if = over and uses that as the target for the scrolling event. If that widget doesn't = exist (usually meaning that it returned {} indicating we are outside the Tk = app), then use the widget which has the actual [focus]." So this proposal doesn't avoid all the Combobox focus issues, but it will avoid the most common ones. > Implementation question: should the selected item "wrap=20 > around" when scrolled with the mousewheel, or should=20 > scrolling up (resp down) stop at the first (resp last) item? Hmmm, I haven't seen wrapping done with mousewheel scrolling. The mousewheel is an adjunct to the scrollbar, and scrollbars don't wrap. Jeff |