file_types() is not available on macOS.
While browsing it should only show PNG files.
Does anyone know an alternative way to browse through multiple PNG files?
Line 9
# /usr/bin/python3
# -*- coding: utf-8 -*-
import PySimpleGUI as sg
def main():
layout = [
[sg.FilesBrowse(button_text='Galaxie(n) hochladen', file_types=('.png'), key='_FILES_')],
[sg.OK(),
sg.Cancel()]
]
window = sg.Window('Vorverarbeitung', layout, background_color='#1e1e1e')
while True:
event, values = window.read()
print(values['_FILES_'].split(';'))
if event in (None, 'Exit'):
break
window.close()