wxWidgets / Phoenix

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

EVT_GRID_RANGE_SELECT not triggered when clicking the top left corner to select all cells #1937

Open champignoom opened 3 years ago

champignoom commented 3 years ago

Operating system: Manjaro 21.0 wxPython version & source: 4.1.1, pypi Python version & source: 3.9.2, distro

Description of the problem: As stated in the title, clicking the top left corner does not trigger EVT_GRID_RANGE_SELECT, though the whole grid is visually selected.

Code Example (click to expand) ```python import wx import wx.grid app = wx.App() frame = wx.Frame(None, -1, "title") g = wx.grid.Grid(frame, -1) g.CreateGrid(20, 6); g.Bind(wx.grid.EVT_GRID_RANGE_SELECT, lambda ev: print('range_select', flush=True)) frame.Show(True) app.MainLoop() ``` 1. Click the top left corner, nothing is printed. 2. Click any row label, 'range_select' is printed. 3. Click any column label, 'range_select' is printed. 4. Click any cell, 'range_select' is printed.
swt2c commented 3 years ago

This was broken upstream but seems to have been fixed here: https://github.com/wxWidgets/wxWidgets/commit/9324c7bfddb0cfa6b4b7328d82b4a8f9815a3e01

Should be fixed in the next release.