wxWidgets / Phoenix

wxPython's Project Phoenix. A new implementation of wxPython, better, stronger, faster than he was before.
http://wxpython.org/
2.29k stars 515 forks source link

Tip window not destroyed when mouse outside bounding rectangle #2109

Open ibea84 opened 2 years ago

ibea84 commented 2 years ago

Operating system: Windows 10 Pro wxPython version & source: wxpython-4.1.1 from pypi repo
Python version & source: Python 3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24), via installer from python.org

Description of the problem: In the 4.1.1 version, the TipWIndow is not destroyed when moving the mouse out of a BoundingRect. This behavior is not observed in 4.1.0. Is this a bug or intended behaviour?

Example of multiple tip windows staying alive after moving mouse out of BoundingRect: image

Code Example (click to expand) ```python import wx class RadioBoxFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, -1) panel = wx.Panel(self, -1, pos=(10, 10)) sampleList = ['Zero', 'One', 'Two'] self.option = wx.RadioBox(panel, -1, "Select an option", pos=(10, 10), size=wx.DefaultSize, choices=sampleList, majorDimension=3) self.Bind(wx.EVT_RADIOBOX, self.getOption) panel.Bind(wx.EVT_MOUSEWHEEL, self.getWheelOption) self.Show() def getWheelOption(self, event): whlRot = event.GetWheelRotation() if whlRot < 0: nxt = self.option.GetSelection() + 1 else: nxt = self.option.GetSelection() - 1 if nxt > self.option.GetCount() - 1: nxt = 0 if nxt < 0: nxt = self.option.GetCount() - 1 self.option.SetSelection(nxt) txt = "Option " + self.option.GetString(nxt) + " Selected" tw = wx.TipWindow(self, txt) tw.SetBoundingRect(wx.Rect(1, 1, 1, 1)) def getOption(self, event): state1 = self.option.GetSelection() if __name__ == '__main__': app = wx.App() RadioBoxFrame() app.MainLoop() ```
skilkis commented 2 years ago

I am having the same issue