PopUpMe | A jQuery plugin for showing simple and beautiful PopUps | Plugin library
kandi X-RAY | PopUpMe Summary
kandi X-RAY | PopUpMe Summary
A jQuery plugin for showing simple and beautiful PopUps.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of PopUpMe
PopUpMe Key Features
PopUpMe Examples and Code Snippets
Community Discussions
Trending Discussions on PopUpMe
QUESTION
I have a slight problem in my code. I need a popup menu on my interface, that pops up, not when the right mouse button is pressed, but when a button (tkinter widget) is clicked.
An Example would be this: http://effbot.org/zone/tkinter-popup-menu.htm
However, instead of the event coordinates, I want to create the popupmenu at the same coordinates as the button.
self.popup_menu.tk_popup(x_button, y_button, 0)
The problem is that, when I move my interface window or scroll the scollbar (I have one in my interface) and click on the button again, the popupmenu is created not at the exact position where the button is. It seems that .tk_popup is only taking the window coordinates rather than the canvas coordinates.
Does someone know a solution?
EDIT: Here is a example:
...ANSWER
Answered 2020-Sep-03 at 20:37Buttons have a couple methods that give you what you want: .winfo_rootx() and .winfo_rooty() Here is a working example:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install PopUpMe
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page