orbtk icon indicating copy to clipboard operation
orbtk copied to clipboard

Feature request: File browser

Open lukors opened this issue 4 years ago • 4 comments

Context

Many applications need to select files for saving and loading things.

Problem description & Solution

Right now if you want to save something in a specific location you can have a text box and let the user type in a path. That's cumbersome, it would be a great improvement to be able to have a file browser widget with the following characteristics:

  • In a new window that can be moved around separately from the main window
  • Always on top of the main window
  • Settings for the programmer..
    • Set a path for the browser to start in
    • modal or not, so the main window can no longer get any input (except closing) until the browser is closed if so desired
    • Show only certain file extensions
    • Allow selections of only folders, only files or both
    • Allow selection of only a single file/folder or several
    • The text on the "load" button, so we can set it to "load, save, import, export" or whatever we want
    • The title of the window

Examples and MockUps

Blender's file dialog is a good example of what it could look like:

blender_2020-05-07_15-01-09

I'm not sure what the best way to implement this in OrbTk would be. I attempted to make some code examples, but it was too big of a project to figure it all out right now.

lukors avatar May 07 '20 13:05 lukors

Doing this depends on having a table view or something like it: https://github.com/redox-os/orbtk/issues/135

lukors avatar May 07 '20 14:05 lukors

We could start with a ListView based file browser and extend it after the table is finished. An alternative way could be to use native file browsers.

FloVanGH avatar May 07 '20 17:05 FloVanGH

I guess which path should be chosen depends on the goals of the project.

I don't have the experience to know which is more desirable.

If a custom browser is the path chosen, starting with something really simple is a good idea. Having something is a lot better than having nothing.

lukors avatar May 07 '20 18:05 lukors

We could start with a ListView based file browser and extend it after the table is finished. An alternative way could be to use native file browsers.

I want to add my 2c here. The way to go here first are native file browsers. IMHO. And the super duper multi cool own browser should be added when OrbTK isn't any longer a moving target - code wise.

M4SSD35TRUCT10N avatar Oct 05 '20 17:10 M4SSD35TRUCT10N