|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
from tkinter import *
window = Tk()
menu = Menu()
def callbakc(event):
menu.post(event.x_root, event.y_root)
for item in ['文件', '编辑', '视图', '格式']:
menu.add_command(label=item)
window.bind('<Button-3>', callbakc)
window.mainloop()
遇到的问题1:
F:\Anaconda\AnacondaApp\lib\site-packages\numpy\__init__.py:148: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
from . import _distributor_init
问题2:
event.x_root和event.y_root的含义?
谢谢各位了!!! |
|