Widget absolute coordinates (to tell if a mouse click is within its boundaries) #1864
Unanswered
jeffwright13
asked this question in
Q&A
Replies: 1 comment
-
On further reflection, this is probably a malformed question. Messing about with pynput I see that the coords it returns from So really, I guess the only think I can fall back to is asking: how do I know when a mouse click has occurred within a rich Panel? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to tell what range of coordinates a specific widget occupies? For example, a Panel object has a height and a width, but I can't find any attributes that tell what absolute coords it overlays on the console.
The reason I am looking for this is to be able to tell if a mouse click is 'inside' an object or not. I'd like to be able to click on a Panel, for example, and after verifying that the click is within the Panel's boundaries, run some callback code. I can use a library like pynput to get absolute screen coordinates for mouse clicks. I just need something to compare those values to.
Beta Was this translation helpful? Give feedback.
All reactions