Select Directory with TGFileDialog

Dear ROOTers,

is there a way, to select a directory with the help of the class TGFileDialog?
Usually, it’s possible to select a file or mutliple files. But I want to select a directory. I wasn’t successfull on finding a solution on this problem, so here my question:
Is there a special filter which can be used? Or exists another class providing the function to get a directory?

Thanks for your help.


Hi Fabian,

See [url= post[/url]

Cheers, Bertrand.

See also a proposed patch: 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: