- NSIS Discussion
- list of checkboxes (revisited)
Archive: list of checkboxes (revisited)
cervezas
6th January 2006 19:00 UTC
list of checkboxes (revisited)
It was asked back in May 2004 if there was a way to make a custom page that has a list of checkboxes similar to the components list: see here
I have a similar requirement to the user who posed that question: the list needs to be something that can be populated at runtime, needs to display in its own page, and needs to be scrollable since for a certain number of users it could contain dozens of items.
Is the answer to this still that you have to use the System plugin and Win32 APIs to create this or is it now possible to do this with InstallOptions? (If someone can point to an example of something similar to this, of course that would be great!)
alient
17th May 2006 18:48 UTC
anyone have a solution to this? I need to do exactly the same but can't figure out how to do so.
Afrow UK
17th May 2006 18:50 UTC
EmbeddedLists plug-in
-Stu
alient
17th May 2006 22:54 UTC
Thanks alot!
This is not exactly what I wanted, but it is close enough and I think I can make it work.
Thanks again!
Afrow UK
18th May 2006 09:13 UTC
If you wanted something identical to the tree view control on the components page, I could add that as well.
-Stu
alient
18th May 2006 18:04 UTC
What I need is the additional ability to set the state of the checkboxes that is in the list. One of my checkbox is the parent of all the other checkboxes, so its state affects all other checkboxes' state. If the parent is checked, all the rest need to be marked as checked. If the parent is unchecked, all the rest should also be unchecked so that the user can check them individually. Is that possible?
Also it would be nice to be able to use checkboxes that without using the MultiColumn.
Thanks!
Afrow UK
18th May 2006 18:33 UTC
It uses a syslistview32 control, not a systreeview32 control.
You can't have child items under parent items in a list view control. The plugin would have to be expanded to add support for a dialog with a tree view control.
To set an items' state to checked, add a + in front of the item name.
-Stu
alient
18th May 2006 18:36 UTC
The parent/child relationship is something I can manage, I don't need the view to display child under parent only when parent is expanded. So treeview control is not required for now, but might be nice to have in the future.
The ability to set the state of the checkbox is a big help!
Is it hard to enable checkboxes w/o using MultiColumn?
Thanks for the quick reply!
Afrow UK
18th May 2006 19:04 UTC
It is possible, but not without adding another dialog resource which will add to the plugin size. List view controls support different list styles but unfortunately the list style cannot be changed dynamically at run time.
I would like to add treeview support as it's one thing that would be very useful. I might even add list images too.
-Stu
alient
18th May 2006 19:09 UTC
Is it possible for you to show me how to add the additional dialog resource so I can use checkboxes w/o using MultiColumn? Plugin size is not a big concern for my project.
Thanks!
Afrow UK
18th May 2006 19:13 UTC
Open the source code in Visual Studio 6 or .NET and open EmbeddedLists.rc. You want the IDC_MULTICOLUMN dialog and you need to change the list view control View property from Report to List. Make sure the build configuration is set to Release and not Debug. If you build from Contrib\EmbeddedLists\ the plugin will be put in the Plugins folder directly. You should be able to ommit the /HEADINGS parameter altogether when calling the plugin.
-Stu
alient
18th May 2006 22:20 UTC
The project depends on exdll.h which is not included in the original zip file. Can you please provide me the missing files? Thanks!
Compilation Error:
Cannot open include file: '..\ExDll\exdll.h'
Afrow UK
19th May 2006 00:02 UTC
It's in the NSIS source distribution, but here it is anyway.
Rename to exdll.h and place in Contrib\ExDLL.
I've been working on the new version. So far I've added support for check boxes on all types of lists; column widths can now be changed; headings can be removed via plugin parameters; item texts can be edited and item sorting has been added.
There is now only one resource instead of three.
Tomorrow I will add tree view support and perhaps list item icons as well.
-Stu
alient
19th May 2006 00:14 UTC
awesome!
Afrow UK
20th May 2006 00:01 UTC
Had little time today so I only added item icon support.
TreeView will come tomorrow.
-Stu
alient
20th May 2006 00:05 UTC
I will check in again next Monday. Thanks!
Afrow UK
22nd May 2006 22:43 UTC
Just to let you know I've done some more work and it's nearly done. Just need to do debugging and write plugin documentation.
Plugin now uses INI files for accessing data as plugin parameters were getting very messy.
-Stu
alient
22nd May 2006 23:24 UTC
Thanks for the update.
Afrow UK
23rd May 2006 22:26 UTC
Should be done by tomorrow evening (GMT).
-Stu
Afrow UK
24th May 2006 20:48 UTC
You can download the new version from here:
http://nsis.sourceforge.net/File:EmbeddedLists.zip
If you need any help or find any issues please post here.
-Stu
zeeh3
25th May 2006 16:04 UTC
This new version is very interesting, but has some bugs. The items selected are not shown correctly with MessageBox and single select allows multiselection :(
Afrow UK
25th May 2006 16:07 UTC
I'll have a look soon. Basically ran out of time so I had to get it off my shoulders :)
-Stu
Afrow UK
25th May 2006 17:27 UTC
Fixed the problems that you mentioned.
http://nsis.sourceforge.net/File:EmbeddedLists.zip
-Stu
alient
25th May 2006 18:03 UTC
Looking good! Thanks Stu!
zeeh3
26th May 2006 02:09 UTC
Almost perfect... all MultiColumn and some TreeView examples still not displaying correct selected items and TreeView Basic items can't be selected.
Afrow UK
26th May 2006 08:35 UTC
You can't select multiple items in the TreeView control. If you want to be able to select one item, I can add a boolean to enable/disable the unselect feature.
I'll check the problems later this evening.
-Stu
Afrow UK
26th May 2006 17:34 UTC
Couldn't find any plugin issues, except the scripts where Pop[ping] $R0 twice (one Pop was for using the old plugin and wasn't removed).
If you find that items don't appear selected in the order that you have them set in the INI file, then that'd be Sort=1 in action.
-Stu
zeeh3
26th May 2006 18:52 UTC
Yes, in fact the extra "Pop $R0" was the culprit for multiselect issues. In TreeView_Basic example if I try to select one item, it remains unselected and $R0 is /END after popping; in TreeView_LabelEdit example, if I select one item, no message appears indicatiing it as selected and $R0 is /END after popping.
Afrow UK
26th May 2006 19:35 UTC
That is by design. If you would like support for selection I will add it.
-Stu
zeeh3
26th May 2006 19:44 UTC
Originally posted by Afrow UK
That is by design. If you would like support for selection I will add it.
-Stu
It would be very nice :)
Afrow UK
26th May 2006 20:15 UTC
http://nsis.sourceforge.net/File:EmbeddedLists.zip
TreeView items are now selectable by default.
They cannot be selected with NoItemSelection=1.
-Stu
DamagedGenius
3rd January 2007 09:06 UTC
I realize this topic is somewhat old, but I have a question about the plugin. I was poking my way through the source and the plugin, and this is perfect except for one detail. Is there any way to change the colors of the dialog items? I'm using an installer skin and the default grey looks a tad bit out of place.