Old 3rd May 2011, 12:51   #1
SkywalkerY
Junior Member
 
Join Date: May 2011
Posts: 5
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?
SkywalkerY is offline   Reply With Quote
Old 3rd May 2011, 14:02   #2
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 517
Send a message via ICQ to T.Slappy
The best way is to create new page using nsDialogs, NSIS does not have multiple $INSTDIRs

Cool looking skinned Graphical Installers: www.graphical-installer.com
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsignedsw.com
Develop NSIS projects in Visual Studio 2005-2017: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.2 Tokyo: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 3rd May 2011, 14:25   #3
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
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.
MSG is offline   Reply With Quote
Old 3rd May 2011, 14:35   #4
SkywalkerY
Junior Member
 
Join Date: May 2011
Posts: 5
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).
SkywalkerY is offline   Reply With Quote
Old 3rd May 2011, 14:48   #5
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
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.
MSG is offline   Reply With Quote
Old 3rd May 2011, 15:06   #6
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,843
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...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 4th May 2011, 08:04   #7
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 517
Send a message via ICQ to T.Slappy
Quote:
!insertmacro MUI_PAGE_DIRECTORY ;normal directory page, uses $instdir
!define MUI_DIRECTORYPAGE_VARIABLE $YourVar
!insertmacro MUI_PAGE_DIRECTORY
Hehe, nice, I did not know about this!
Writing custom plugin is probably the best solution, but as we are in NSIS forum I suggest to write own header and use nsDialogs

Cool looking skinned Graphical Installers: www.graphical-installer.com
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsignedsw.com
Develop NSIS projects in Visual Studio 2005-2017: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.2 Tokyo: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 4th May 2011, 14:34   #8
SkywalkerY
Junior Member
 
Join Date: May 2011
Posts: 5
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.
SkywalkerY is offline   Reply With Quote
Old 4th May 2011, 14:46   #9
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
That sounds like an ideal solution

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Tags
dialog, folder, multiple, select

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump