How can I programmatically set uigetfiles() display mode and file sort order?

I use Matlab 2023b to create applications in Linux and Windows. The function uigetfiles() default behavior in Windows is to display files w/details, in reverse chronological order, which is what I want. Conversely, in Linux, it displays the same files as a list in chronological order. Users can use the UI tools to change default characteristics, but I'd like to set them programatically before the UI is displayed. Is there a way to control the display mode (icon, list, detail) and file order (alphabetical, chronological, etc?), or is there an alternative function that does this?

 Réponse acceptée

uigetfiles() invokes system-specific behaviour that there no interface for. For example on Mac it invokes the MacOS file browser window.
You can build your own uigetfiles out of list boxes that you populate with whatever you want, and to which you add extra list entries for possibilities such as changing the sort order or selecting a different directory.

3 commentaires

Douglas
Douglas le 8 Jan 2025
Déplacé(e) : Stephen23 le 8 Jan 2025
Thanks Walter.
Of the options proposed, fileexchange/10867 is a better starting point for my needs, but both options lack the file-tree navigation tool which makes them less desirable than uigetfile(). I'd prefer to use an existing utility than adapting either of these to my needs.
I just went through and tagged a number of contributions that impliment file choosers (to varying degree of utility)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur App Building dans Centre d'aide et File Exchange

Produits

Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by