Post by RichPost by alexandruI searched my code for a reason why the ttk::notebook tabs are
changed upon mose wheel events.
Does anywone know how to deactivate this behavior?
No sure if there is another module causing this.
A basic ttk:notebook does not appear to bind to mouse wheel events in
$ rlwrap wish
% ttk::notebook .n
.n
% winfo class .n
TNotebook
% bind TNotebook
<Destroy> <Control-Key-ISO_Left_Tab> <Control-Shift-Key-Tab>
<Control-Key-Tab> <Key-Left> <Key-Right> <Button-1>
Therefore this behavior appears to be arising from some other module
you are using.
This functionality was proposed for Tk 8.7 (and 9) by Harald Oehlmann
with TIP 591, and for these Tk versions it is now included in the core.
For earlier Tk versions it is not present in the core, but the
Scrollutil package includes it since its version 1.9. For this reason,
if your application invokes "package require scrollutil_tile" then it
will automatically activate the bindings that are responsible for the
navigation between the tabs via the mouse wheel.
Now, for some reason you don't want to have this handy feature. You can
deactivate it for all ttk::notebook widgets via
bind TNotebook <MouseWheel> ""
bind TNotebook <Shift-MouseWheel> ""
or just for an individual ttk::notebook $nb via
bind $nb <MouseWheel> break
bind $nb <Shift-MouseWheel> break
The above is for Windows, which to my knowledge is the platform you are
working on.
--
Csaba Nemethi https://www.nemethi.de mailto:***@t-online.de