GUI directory dialog

Hello,

I’m currently working on a GUI and was wondering if there is a class similar to TGFileDialog but for directories. For example, in TGFileDialog, the user must select a file to open or save. Instead, I would like the user to just select a directory, but not have to specify a file. I hope that makes sense. If not, I’ll be happy to clarify. Thank you!

Hi,

See for example the $ROOTSYS/tutorials/gui/guitest.C tutorial (or the $ROOTSYS/test/guitest demo application). From the “Test” menu item, select “List directory…”

Cheers, Bertrand.

Hi,

Ah, thanks. I overlooked that. I’ll work with it and see what I can do.

Could yo please send me the example since ine my installation I have not the tutorial
Thanks in advance
regards
Thibaut

See root.cern.ch/root/html/tutorial … est.C.html

I have proposed a patch for this: TGFileDialog new option to open / save to a folder, instead of a file by ferdymercury · Pull Request #7237 · root-project/root · GitHub

[EDIT] → It’s now in ROOT master :slight_smile: