注册 登录
编程论坛 Python论坛

PySimpleGUI 本文框 如何用滑鼠右鍵貼上?

Z89 发布于 2022-06-10 21:26, 961 次点击
PySimpleGUI  如何用滑鼠右鍵貼上文字?  
或是在File-->貼上   把文字貼到網址欄位的效果??  







程序代码:
import PySimpleGUI as sg

def ChatBota():
    menu_def = [[ "File", [ '貼上' ]]]  
    layout = [[sg.Menu(menu_def, tearoff=True)],
              [sg.T('輸入網址')],
              [sg.T('網址'),sg.InputText()],
              [sg.Button('儲存')] ]
    window = sg.Window('表單', layout)
    event, values = window.read()

ChatBota()




[此贴子已经被作者于2022-6-11 19:25编辑过]

1 回复
#2
Z892022-06-12 14:42
自己找到答案了~謝謝
1