Is there a bug in the natural scrollbar trough click event handler, is something wrong with the way I set it up, or something else? I ask because it doesn't always work (when it doesn't work, it either does nothing or else moves to the wrong position). The scrollbars otherwise work fine. Sometimes the trough clicks do work, but a lot of the time they don't. (More than one or two clicks is often needed to discover the problem.)
hbar=Scrollbar(newTabFrame, orient=HORIZONTAL, bg=self.d["hbgcolor"], troughcolor=self.d["htcolor"]);
vbar=Scrollbar(newTabFrame, orient=VERTICAL, bg=self.d["vbgcolor"], troughcolor=self.d["vtcolor"]);
scroll=Text(self, newTabFrame, font=self.d["font"], undo=True, tabs=("0.4c"), wrap=self.d["wrap"], xscrollcommand=hbar.set, yscrollcommand=vbar.set, bg=self.d["bgcolor"], fg=self.d["fgcolor"], insertbackground=self.d["insertcolor"]);
vbar.grid(row=1, column=2, columnspan=2, rowspan=4, sticky=N+S);
vbar.config(command=scroll.yview);
hbar.grid(sticky=E+W);
hbar.config(command=scroll.xview);
Once again, it's only when I click on the troughs where I experience a problem. All the other scrollbar functionality (which is most of it) works fine. For those who don't know, a scrollbar trough is the long part of the scrollbar that does not move.
My scrollbars are attached to Text widgets inside Frames that are inside of ttk.Notebook
widget tabs.
To directly answer your question, no, there is no known bug in the scrollbar code. This code has been in use for more than a decade without anyone reporting issues with the trough. That doesn't mean a bug isn't possible, but it is highly unlikely. There also doesn't appear to be any problems with how you defined the scrollbar or how you attached it to the text widget. .
Based on comments to the original question, it sounds like you have some bindings in your app that may be interfering with the default behavior of the scrollbar.