question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow only certain file extensions in create_file_dialog()

See original GitHub issue

It is often helpful to have only certain file types with certain extensions selectable when performing an OPEN_DIALOG with create_file_dialog(). This way, files without this extension are not possibly selectable, and will be greyed out. Is there a cross-platform way to easily do this?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
r0x0rcommented, Nov 17, 2017

Merged

0reactions
NiceneNerdcommented, Jan 21, 2021

In many cases a program will only, or ordinarily, be saving to a specific file format, in which case it can be convenient or helpful to end users to have the save dialog restrict the file format or provide specific options. Note that many popular programs already do this (e.g. standard office suites).

Read more comments on GitHub >

github_iconTop Results From Across the Web

C# WPF - Only allow certain file extensions - Stack Overflow
I just want to know how I can restrict the user to only add ".txt" files, nothing else? (By directly validation it inside...
Read more >
Only allow some file extensions in specific folders at upload
In my file explorer I list my App_Themes folder. Is there a way to set file extensions that are allowed in specific folders...
Read more >
FileDialog.Filter Property (System.Windows.Forms)
Gets or sets the current file name filter string, which determines the choices that appear in the "Save as file type" or "Files...
Read more >
Power Apps File Attachment Validation - Allow only Specific ...
Welcome to one more interesting tip for Power Apps Forms. During this video, we will learn how we can restrict users to upload...
Read more >
wxFileDialog Class Reference - wxWidgets
For open dialog only: allows selecting multiple files. wxFD_CHANGE_DIR: Change the current working directory (when the dialog is dismissed) to the directory ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found