PySimpleGUI文件浏览器特定的文件类型 [英] PySimpleGUI file browser specific file type
本文介绍了PySimpleGUI文件浏览器特定的文件类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试仅浏览excel文件,但是如何在PySimpleGUI浏览按钮中限制文件类型.
i am trying to browse a only excel files but How to restrict the file type in PySimpleGUI browse button .
推荐答案
layout = [[sg.In(),sg.FileBrowse(file_types =((("Text Files","* .txt"),)))] ]
layout = [[sg.In() ,sg.FileBrowse(file_types=(("Text Files", "*.txt"),))]]
这篇关于PySimpleGUI文件浏览器特定的文件类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文