Page 1 of 1
GUI: Select directory
Posted: 04 Oct 2014 23:25
by 147852369
Hello people,
is there a possibility to choose a directory?
I want to implement a function in my extension GUI which can select a directory on my OS.
Like in HTML:
<input type="file" />
Thanks.
Re: GUI: Select directory
Posted: 06 Oct 2014 16:56
by mederi
File/folder open dialog is not available, but it is possible to create a custom dialog:
net.opendir( path ): List a directory's contents.
The net module is again available in VLC-2.2, not in current VLC-2.1.x.
Re: GUI: Select directory
Posted: 07 Oct 2014 20:19
by 147852369
That's sadly not what I'm searching for. My extension already opens a dialog. I want to click on a button in this dialog and be able to select a directory. I believe there's no alternative for my reason.
Re: GUI: Select directory
Posted: 08 Oct 2014 10:46
by mederi
As a workaround you could create your own dialog to browse for files/folders. You have 2 options - add/delete widgets in your current dialog box or delete the current dialog box and open a new one:
https://forum.videolan.org/viewtopic.ph ... 14#p408965
Just use a list widget, where you can list a directory's contents. Then you have to parse the selected item and differentiate file or folder. Then just relist a new contets of another folder (subfolder) in the list widget.
Re: GUI: Select directory
Posted: 10 Oct 2014 14:45
by 147852369
Thanks you, mederi! You are very helpful.