Replies: 1 comment
-
Figured it out. fyne.PointEvent.AbsolutePosition works. |
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
-
Hi,
My goal is to show popup menu at the position of mouse pointer when right clicking on an list item, which requires getting both listItemId and the absolute position relative to fyne.window.
I am using ExtendBaseWidget to add OnSecodaryTapped callback to the list item, so I can get listItemId in the event callback. Since the List widget doesn't have Canvas() method, I have to bound the popup menu to the window's canvas. The position param of the event callback is relative to the current list item, so I cannot calculate the absolute position relative to the window.
Is it possible to get canvas of a widget?
Can anybody kindly help me out? Thank you!
Beta Was this translation helpful? Give feedback.
All reactions