【发布时间】:2021-09-21 14:44:19
【问题描述】:
我的按钮
button = ttk.Button(frame_file, text='Open file', command=lambda *args: openfile())
button.grid(row=1, column=1)
调用函数openfile()
def openfile():
return fd.askopenfile()
如何在 main 中获取打开文件的路径(定义按钮的位置?)
【问题讨论】:
-
为什么不用stackoverflow.com/questions/19281280/… 中描述的类似方式分配呢?以这种方式,我认为如果不是不可能的话,那将是相当复杂的。