Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get object at point? wxpython

Is it possible to get what object is at point (x,y) with wxpython?

buton=wx.Button(self, id=wx.ID_ANY, label='object',pos=(10,10), size=(175, 28))
print GetObjectAtPoint(10,10)   # this function does not exist

If there is anything similar to the above, that would be nice or if there is suggestions on what I should do. Or even, if there is anything such as GetObjectsInRange(x1,y1,x2,y2)

like image 840
thelost Avatar asked Nov 24 '25 14:11

thelost


2 Answers

There is

wx.FindWindowAtPoint(pt)

Also

GenericFindWindowAtPoint(pt)

and

FindWindowAtPointer()

See http://www.wxpython.org/docs/api/

like image 188
Diaa Sami Avatar answered Nov 26 '25 04:11

Diaa Sami


Have you tried FindWindowsAtPoint()? That's about the only thing I can think of that does something like that. You might also take a look at the Widget Inspection Tool to find out how it grabs information about widgets when you click on them.

like image 22
Mike Driscoll Avatar answered Nov 26 '25 04:11

Mike Driscoll



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!