Select folders dialog with checkboxes
Hi. I need dialog for multiple select folders. In google i'm not found anything helpful. How can i do or find this dialog?
Archive: Select folders dialog with checkboxes
Select folders dialog with checkboxes
Hi. I need dialog for multiple select folders. In google i'm not found anything helpful. How can i do or find this dialog?
The best way is to create new page using nsDialogs, NSIS does not have multiple $INSTDIRs
Actually it does. You can use:
!insertmacro MUI_PAGE_DIRECTORY ;normal directory page, uses $instdir
!define MUI_DIRECTORYPAGE_VARIABLE $YourVar
!insertmacro MUI_PAGE_DIRECTORY
But I agree that a custom nsDialogs may may be more appropriate.
No. I need this not for $instdir. I want a button, which opens dialog. User selects several working folders and they saved into config of my program. A count of working folders is unknown. So, I need select folders dialog with checkboxes (like in Explorer of Windows 7).
Aha, you want a listview element with checkboxes, containing folders... Hmm, I don't think I've ever seen anyone doing that before. There's this header: http://nsis.sourceforge.net/Header_file_for_Listview that might help out. But how to populate it with a nested folder view... I can't help you with that. Wait for one of the win32 gurus to jump in.
While it might be possible to implement a treeview or listview with checkboxes and item's from the file system, the amount of system code with be huge. You might want to consider writing a plugin or maybe rethink your options...
!insertmacro MUI_PAGE_DIRECTORY ;normal directory page, uses $instdirHehe, nice, I did not know about this!
!define MUI_DIRECTORYPAGE_VARIABLE $YourVar
!insertmacro MUI_PAGE_DIRECTORY
So, I'm cheeting:) I added listbox and two buttons: add and del. Add button opens standart select folder dialog and selected folder add in listbox. Del button removes item from listbox. That's all.
That sounds like an ideal solution :)
Stu