[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2022-04-07 Thread PySimpleGUI


PySimpleGUI  added the comment:

Hi Ned... thank you kindly for the response.  

Code was provided on Dec 26, 2021 that reproduces the problem.  We've taken the 
extra step of verifying on Linux and Mac that indeed the problem is on those 
operating systems as well.  

I'm struggling to understand why it's now suggested that the way to get help 
from the tkinter team is to also produce code directly in TCl/TK directly or 
that posts on StackOverflow would be of help.  It appears to be a bug that's in 
the lower-level code that happened between releases 8.6.11 and 8.6.12.  We're 
not looking for a workaround, which I suppose is the purpose of posting on 
StackOverflow, we're looking for a fix.

We're doing our best to follow solid best practices of reproducing problems, 
providing code to demonstrate the bug, and using the official bug reporting 
mechanism (bugs.python.org). Any help that can be provided in getting the right 
persons from the tkinter team responsible for the code is greatly appreciated.  
Greatly appreciated!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2022-04-04 Thread Ned Deily


Ned Deily  added the comment:

Unfortunately, this is the kind of issue, often the case with tkinter issues, 
where it is difficult to know where the problem might be. While I know little 
about the internals of tkinter and Tk, my intuition is that this is most likely 
a Tk issue and would need to be resolved by the Tk folks. For these kinds of 
problems, it is usually helpful to try to reproduce the problem using Tcl and 
Tk directly; I have no idea how difficult that would be in this case. If 
someone can do so, then it would be much more likely to get the Tk project to 
look into it (by opening an issue with them). Another ofter useful approach is 
to ask on the tkinter mailing list or on StackOverflow where people with both 
tkinter and Tk expertise hang out.

https://mail.python.org/mailman/listinfo/tkinter-discuss

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2022-04-04 Thread Jim Wygralak


Jim Wygralak  added the comment:

DATA:
Just chiming in to report that I'm seeing this issue with the following freshly 
installed:
Python 3.10.4
tkinter 8.6.12
PySimpleGUI 4.57.0
OS is Windows 10

As others have report it is related to the cursor entering the tool tip box 
before clicking the button.

OBSERVATIONS:
I've noticed that the tool tip always seems to appear up and to the right of 
the cursor. If I approach the button by moving the cursor down & left, the tool 
tip appears when the cursor enters the button, then as I continue to move the 
cursor to the center of the button I'm moving AWAY FROM the tool tip, and the 
issue doesn't appear.

However, if I approach the button by moving the cursor up and to the right, the 
tool tip appears as the cursor enters the button, and it overlaps the button. 
As I continue to move the cursor to the center of the button, it enters the 
tool tip box and triggers this fault.

The only 100% effective workaround appears to be not using tooltips. That is a 
loss of function, and not an acceptable long term solution.

--
nosy: +jim.wygralak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2022-03-16 Thread PySimpleGUI


PySimpleGUI  added the comment:

We've been able to verify this is a problem on Windows, Mac and Linux using the 
code that Jason posted earlier.

Here's a video of the behavior on Linux.  The problem you'll see is that button 
click events stop being generated.

I'm hoping this is a symptom of a larger problem as there are other problems 
we've seen on 8.6.12.  This is unusual as tkinter has been rock solid since 
I've been using it over the past few years.

https://user-images.githubusercontent.com/46163555/158422534-964b7edb-f845-468b-adba-57f9139009c4.mp4

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2022-02-06 Thread PySimpleGUI


PySimpleGUI  added the comment:

I'm sorry for not getting back quicker on the Linux testing.  I've not figured 
out how to get 8.6.12 up and running on my Linux environment.  I've tried both 
Python 3.9 and Python 3.10 and neither have 8.6.12.

--
Added file: https://bugs.python.org/file50607/Linux3.10.jpg

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2022-02-02 Thread PySimpleGUI


PySimpleGUI  added the comment:

I'll do some Linux testing today to see if I can replicate it.

There was another problem reported that only on 8.6.12 on Mac (sorry, don't 
mean to muddy the waters by mentioning it).  The reason I bring it up is that 
I've not seen a tkinter release have these specific kinds of problems in a very 
long time and am wondering if something was changed internally that could have 
an impact on this problem.

I'll report back with what I find on Linux. Thank you SO much for giving this 
problem some attention.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2022-02-01 Thread Jason Yang


Jason Yang  added the comment:

The platform is WIN10 which shown at last line in first message.
I don't have other platforms to test if ok or not.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2022-02-01 Thread Ned Deily


Ned Deily  added the comment:

Can you say which platforms are affected by this? The OP's example appears to 
be from a Windows system. Are Unix (X11) and/or macOS versions of Tk affected, 
too?

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2022-02-01 Thread PySimpleGUI


PySimpleGUI  added the comment:

This issue is impacting multiple PySimpleGUI users in particular.  One 
commented today:  
"I already spent a day trying to figure out what was happening to my UI when I 
found this open issue."
Until a fix is found, I'm going to add a specific check for 8.6.12 and disable 
the tooltip feature and issue a warning to users as to why.  Not sure what 
other options are available at the moment.

--
nosy: +PySimpleGUI

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2021-12-31 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +serhiy.storchaka
stage:  -> test needed
type: crash -> behavior
versions: +Python 3.11 -Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2021-12-26 Thread Jason Yang


New submission from Jason Yang :

Button no response when clicked if mouse move into tooltip and tooltip 
destroyed for Python 3.9.9/3.10.1 and tkinter 8.6.12

You can check it by moving mouse into button, then move to tooltip after it 
shown, then click button and you won't get response for button clicked, but 
"Leave". It is OK for lower version of Python/tkinter.

```python
import sys
from datetime import datetime
import tkinter as tk

class Tooltip(object):
"""
create a tooltip for a given widget
"""
def __init__(self, widget, text='widget info'):
self.waittime = 500 # miliseconds
self.widget = widget
self.text = text
self.widget.bind("", self.enter)
self.widget.bind("", self.leave)
self.widget.bind("", self.leave)
self.id = None
self.top = None

def enter(self, event=None):
print(now(), "Enter")
self.schedule()

def leave(self, event=None):
print(now(), "Leave")
self.unschedule()
self.hidetip()

def schedule(self):
self.unschedule()
self.id = self.widget.after(self.waittime, self.showtip)

def unschedule(self):
id = self.id
self.id = None
if id:
self.widget.after_cancel(id)

def showtip(self, event=None):
x = y = 0
x, y, cx, cy = self.widget.bbox("insert")
x += self.widget.winfo_rootx() + self.widget.winfo_width()//2
y += self.widget.winfo_rooty() + self.widget.winfo_height()//2
self.top = tk.Toplevel(self.widget)
self.top.wm_overrideredirect(True)
self.top.wm_geometry("+%d+%d" % (x, y))
label = tk.Label(self.top, text=self.text, bd=1, font=font, 
relief='solid')
label.pack(ipadx=1)

def hidetip(self):
top = self.top
self.top = None
if top:
top.destroy()

def now():
return datetime.now().strftime("%H:%M:%S")

print(f"Python version : {sys.version.split(' ')[0]}")
print(f"tkinter version: {tk.Tcl().eval('info patchlevel')}")

font = ("Courier New", 40)

root = tk.Tk()
button = tk.Button(root, text="button", font=font,
command=lambda:print(now(), 'Button clicked'))
button.pack(padx=10, pady=5)
tooltip = Tooltip(button, 'This is button 1')

root.mainloop()
```

```python
d:\>python test.py
Python version : 3.10.1
tkinter version: 8.6.12
18:21:52 Enter (Mouse to button)
18:21:54 Leave (mouse to tooltip)
18:21:55 Leave (button clicked get no response)
18:21:57 Leave (button clicked get no response)
18:21:58 Leave (button clicked get no response)

d:\>python test.py
Python version : 3.9.9
tkinter version: 8.6.12
18:22:51 Enter (Mouse to button)
18:22:54 Leave (mouse to tooltip)
18:22:55 Leave (button clicked get no response)
18:22:56 Leave (button clicked get no response)
18:22:57 Leave (button clicked get no response)

d:\>python test.py
Python version : 3.8.10
tkinter version: 8.6.9
18:23:22 Enter (Mouse to button)
18:23:23 Leave (mouse to tooltip)
18:23:23 Enter (mouse stay, and it will repeat `Enter and Leave` again and 
again)
18:23:24 Leave
...
18:23:28 Enter
18:23:28 Leave
18:23:28 Button clicked (button clicked get response)
18:23:31 Leave
18:23:31 Button clicked (button clicked get response)
18:23:32 Leave
```

Platform - WIN10

--
components: Tkinter
messages: 409188
nosy: Jason990420
priority: normal
severity: normal
status: open
title: Button clicked failed when mouse hover tooltip and tooltip destroyed
type: crash
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com