Announcement

Collapse
No announcement yet.

Select folders dialog with checkboxes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #2
    The best way is to create new page using nsDialogs, NSIS does not have multiple $INSTDIRs
    Cool looking installers with custom design: www.graphical-installer.com
    Create Setup Pages easily: www.install-designer.com
    Build installers in Visual Studio 2005-2022: www.visual-installer.com
    or RAD Studio 2009 - 11 Alexandria: www.rad-installer.com

    Comment


    • #3
      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.

      Comment


      • #4
        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).

        Comment


        • #5
          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.

          Comment


          • #6
            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

            Comment


            • #7
              !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 installers with custom design: www.graphical-installer.com
              Create Setup Pages easily: www.install-designer.com
              Build installers in Visual Studio 2005-2022: www.visual-installer.com
              or RAD Studio 2009 - 11 Alexandria: www.rad-installer.com

              Comment


              • #8
                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.

                Comment


                • #9
                  That sounds like an ideal solution

                  Stu

                  Comment

                  Working...
                  X