How to allow the user to select a directory/folder using a Filechooserdialog?

Asked

Viewed 62 times

1

Maybe you can add a directory filter to achieve this.

  • 1

    I took some tags unnecessary for the problem. Are you even using C? Or C++? Or is one or the other. I don’t know if I get it. One of the functions of this dialog is to let the user select a folder. I will try to respond with what I understood.

  • Take a look at [tour]. You can accept an answer if it solved your problem. You can vote on every post on the site as well. Did any help you more? You need something to be improved?

1 answer

2

You probably would have to use the method set_action with the right filter option. Something like this:

seuDialogo.set_action(gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER)

Has an example here in C++.

Gtk::FileChooserDialog dialog("Please choose a folder", Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.