Re: ttk::notebook mouse wheel event

Liste des GroupesRevenir à cl tcl 
Sujet : Re: ttk::notebook mouse wheel event
De : csaba.nemethi (at) *nospam* t-online.de (nemethi)
Groupes : comp.lang.tcl
Date : 30. Dec 2024, 15:00:54
Autres entêtes
Message-ID : <vku92m$1varj$1@tota-refugium.de>
References : 1 2
User-Agent : Mozilla Thunderbird
Am 29.12.24 um 17:25 schrieb Rich:
alexandru <alexandru.dadalau@meshparts.de> wrote:
I 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
any way:
    $ 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:csaba.nemethi@t-online.de

Date Sujet#  Auteur
29 Dec 24 * ttk::notebook mouse wheel event7alexandru
29 Dec 24 `* Re: ttk::notebook mouse wheel event6Rich
30 Dec 24  +- Re: ttk::notebook mouse wheel event1alexandru
30 Dec 24  +* Re: ttk::notebook mouse wheel event3nemethi
30 Dec 24  i+- Re: ttk::notebook mouse wheel event1nemethi
1 Jan 25  i`- Re: ttk::notebook mouse wheel event1alexandru
31 Dec 24  `- Re: ttk::notebook mouse wheel event1et99

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal