wx.FindWindowAtPoint inconsistency

Hi All,

    this is the first of the 2 bugs (?) I am facing while working on
AUI (the Python version of wxAUI). I am attaching a sample which
demonstrates the problem I have.

Basically, in the sample I have a wx.Notebook with 2 pages: the first
one is an enabled wx.Panel, the second one is a disabled wx.Panel. In
a timer set in the notebook, I use the following line of code:

window = wx.FindWindowAtPoint(wx.GetMousePosition())

and I print the value of "window". As you will notice, if you hover
over the enabled wx.Panel, the line prints correctly the wx.Panel
instance (__main__.DummyPanel), while if you hover over the disabled
wx.Panel, the line prints incorrectly the top wx.Frame, as if the
disabled panel didn't even exist.

Now, is it a bug? If not, shouldn't the documentation reflects that
wx.FindWindowAtPoint doesn't look for disbled windows?

Thank you for your suggestions.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

FindWindowAtPoint_Issue.py (1.19 KB)

First google hit for wxFindWindowAtPoint:

http://trac.wxwidgets.org/ticket/2942

-Matthias

···

Am 11.04.2009, 17:44 Uhr, schrieb Andrea Gavana <andrea.gavana@gmail.com>:

Hi All,

    this is the first of the 2 bugs (?) I am facing while working on
AUI (the Python version of wxAUI). I am attaching a sample which
demonstrates the problem I have.

Basically, in the sample I have a wx.Notebook with 2 pages: the first
one is an enabled wx.Panel, the second one is a disabled wx.Panel. In
a timer set in the notebook, I use the following line of code:

window = wx.FindWindowAtPoint(wx.GetMousePosition())

and I print the value of "window". As you will notice, if you hover
over the enabled wx.Panel, the line prints correctly the wx.Panel
instance (__main__.DummyPanel), while if you hover over the disabled
wx.Panel, the line prints incorrectly the top wx.Frame, as if the
disabled panel didn't even exist.

Now, is it a bug? If not, shouldn't the documentation reflects that
wx.FindWindowAtPoint doesn't look for disbled windows?

Thank you for your suggestions.

Hi Matthias,

···

On Sat, Apr 11, 2009 at 4:54 PM, Nitro wrote:

Am 11.04.2009, 17:44 Uhr, schrieb Andrea Gavana <andrea.gavana@gmail.com>:

Hi All,

this is the first of the 2 bugs (?) I am facing while working on
AUI (the Python version of wxAUI). I am attaching a sample which
demonstrates the problem I have.

Basically, in the sample I have a wx.Notebook with 2 pages: the first
one is an enabled wx.Panel, the second one is a disabled wx.Panel. In
a timer set in the notebook, I use the following line of code:

window = wx.FindWindowAtPoint(wx.GetMousePosition())

and I print the value of "window". As you will notice, if you hover
over the enabled wx.Panel, the line prints correctly the wx.Panel
instance (__main__.DummyPanel), while if you hover over the disabled
wx.Panel, the line prints incorrectly the top wx.Frame, as if the
disabled panel didn't even exist.

Now, is it a bug? If not, shouldn't the documentation reflects that
wx.FindWindowAtPoint doesn't look for disbled windows?

Thank you for your suggestions.

First google hit for wxFindWindowAtPoint:

wxTrac has been migrated to GitHub Issues - wxWidgets

Good, next time I will google before making a sample which
demonstrates a 3 years old (3!!!) bug. Isn't it time to fix it ?!?!

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/