Wrong bind for ButtonPress
Nicely done i like this tooltip !!!
ButtonPress goes to mouse btn3. Change to ButtonPress-1 and mouse btn1/left click works fine.
def _init_bindings(self) -> list[Binding]:
"""Initialize the bindings."""
bindings = [
Binding(self.widget, "<Enter>", self.on_enter),
Binding(self.widget, "<Leave>", self.on_leave),
Binding(self.widget, "<ButtonPress>", self.on_leave),
]
if self.follow:
bindings.append(
Binding(self.widget, "<Motion>", self._update_tooltip_coords)
)
return bindings
I'm pretty sure this is the expected behaviour. It's meant to hide the tooltip whenever the user interacts with a widget.
Hi there. yes you are correct about that. It is meant to hide the tooltip.
What i meant is the default bind you have goes to button 3 on the mouse which is right click. I dont think right click is correct i think it should be the normal left click so when you click somewhere else it will hide the tooltip.
Regards Greg
On Tue, 3 Dec 2024 at 20:27, Brian Z @.***> wrote:
I'm pretty sure this is the expected behaviour. It's meant to hide the tooltip whenever a user interacts with a widget.
— Reply to this email directly, view it on GitHub https://github.com/gnikit/tkinter-tooltip/issues/115#issuecomment-2515295443, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVYDU57LZYEJAHZM6B5ADND2DXZZVAVCNFSM6AAAAABSS7JPZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJVGI4TKNBUGM . You are receiving this because you authored the thread.Message ID: @.***>