bcedu
bcedu

Reputation: 158

Vala Gtk Folder selection

I'm creating a simple GTK+ based application in Vala, which should be able to select a folder and then list the files inside it.

I've been able to select a single file using the Gtk.FileChooserDialog but I haven't found how to select a folder instead of a file.

Is there any way to tell the Gtk.FileChooserDialog that folders can be selected or is there any other widget to select folders?

Upvotes: 1

Views: 142

Answers (1)

apmasell
apmasell

Reputation: 7153

Set the action property.

filechooser.action = FileChooserAction.SELECT_FOLDER;

Upvotes: 2

Related Questions