You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if the FileDialog could provide a simple filtering mechanism.
I have attached two patches to do this.
The first patch provides a very simple and crude filter mechanism (simply set
path_filter to a function that returns a bool - True => file/dir is shown,
False => it is hidden).
The second patch extends this to provide an file-extension filter by accepting
a simple list as argument for the constructor. Example being:
ext_f = [
("Images", ("jpg", "jpeg", "png")),
("Audio", ("mp3", "wav")),
("Text files", "txt"),
]
dialog = FileDialog(value="path/to/resources", ext_filter=ext_f)
The user can then choose the relevant filter from a "drop-down" box (a Select
in pgu terms).
Original issue reported on code.google.com by [email protected] on 7 Dec 2012 at 1:09
Original issue reported on code.google.com by
[email protected]
on 7 Dec 2012 at 1:09Attachments:
The text was updated successfully, but these errors were encountered: