简体   繁体   English

PySimpleGui Input + FilesBrowse 自动排序所选文件

[英]PySimpleGui Input + FilesBrowse auto ordering selected files

Using PySimpleGUI, I'm doing a layout with the following line:使用 PySimpleGUI,我正在使用以下行进行布局:

[Sg.Text("Images:", size=(6, 1)), Sg.Input(key='-IN0-', change_submits=True, size=(64, 1)),
           Sg.FilesBrowse('Select')]

The problem is that in the GUI, when I select a list of files (ctrl+mouse click in the selection window), the list apears ordered by name in the Sg.Input element (and so in the '-IN0-' value) but in my program the order of file selection is important.问题是,在 GUI 中,当我 select 文件列表(在选择窗口中按 ctrl+鼠标单击)时,该列表在 Sg.Input 元素中按名称排序(因此在“-IN0-”值中)但在我的程序中,文件选择的顺序很重要。 Searched in PySimpleGUI cookbook and found nothing.在 PySimpleGUI 食谱中搜索,但一无所获。 Someone know how to fix it?有人知道如何解决吗?

I see two answers to this question, one would be to ask the user to add individually by calling the window repeatedly with a different key, or to get the user to assign some sort of order variable to them?我看到这个问题的两个答案,一个是要求用户通过使用不同的键重复调用 window 来单独添加,或者让用户为它们分配某种顺序变量?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM