Skip to content
⌘ NSIS Forum Archive

NSIS 2.0a0 Patch - Always Expanded Treeview

4 posts

sdbarker#

NSIS 2.0a0 Patch - Always Expanded Treeview

Add the following to Ui.c. The first line "{" should be line 856.

Questions, comments?

-Scott

    {
        HTREEITEM hRoot, hNext;
        hRoot = TreeView_GetRoot(hwndTree1);
        hNext = TreeView_GetNextItem(hwndTree1,hRoot,TVGN_NEXT);
        while (hNext != NULL) {
            TreeView_Expand(hwndTree1,hNext,TVE_EXPAND);
            hNext = TreeView_GetNextItem(hwndTree1,hNext,TVGN_NEXT);
        }
    } 
rainwater#
Re: NSIS 2.0a0 Patch - Always Expanded Treeview

Originally posted by sdbarker
Add the following to Ui.c. The first line "{" should be line 856.
The best solution, would be to be able to set flags to tell each node at runtime whether to expand or not.
sdbarker#
Best solution for you, perhaps. 🙂

I always want the whole tree expanded.

When justin gets back, and we all see what plans he has for NSIS 2.0, if this isn't one of them, I'll move it to using flags.

-Scott
sdbarker#
O.k., I've modified this to use the same method as setting a section bold. So now, the following all work:

SubSection "!My Subsection" # subsection is bold
SubSection "*My Subsection" # subsection is expanded

SubSection "%My Subsection" # subsection is both bold AND expanded

Source available upon request.

I'll look into the flags, since I have nothing else to do. 🙂

-Scott