Old 6th January 2006, 18:00   #1
cervezas
Junior Member
 
Join Date: Mar 2005
Posts: 8
Question 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!)
cervezas is offline   Reply With Quote
Old 17th May 2006, 17:48   #2
alient
Junior Member
 
Join Date: Jun 2004
Posts: 13
anyone have a solution to this? I need to do exactly the same but can't figure out how to do so.
alient is offline   Reply With Quote
Old 17th May 2006, 17:50   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
EmbeddedLists plug-in

-Stu
Afrow UK is offline   Reply With Quote
Old 17th May 2006, 21:54   #4
alient
Junior Member
 
Join Date: Jun 2004
Posts: 13
Thanks alot!
This is not exactly what I wanted, but it is close enough and I think I can make it work.

Thanks again!
alient is offline   Reply With Quote
Old 18th May 2006, 08:13   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
If you wanted something identical to the tree view control on the components page, I could add that as well.

-Stu
Afrow UK is offline   Reply With Quote
Old 18th May 2006, 17:04   #6
alient
Junior Member
 
Join Date: Jun 2004
Posts: 13
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!
alient is offline   Reply With Quote
Old 18th May 2006, 17:33   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 18th May 2006, 17:36   #8
alient
Junior Member
 
Join Date: Jun 2004
Posts: 13
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!
alient is offline   Reply With Quote
Old 18th May 2006, 18:04   #9
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 18th May 2006, 18:09   #10
alient
Junior Member
 
Join Date: Jun 2004
Posts: 13
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!
alient is offline   Reply With Quote
Old 18th May 2006, 18:13   #11
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 18th May 2006, 21:20   #12
alient
Junior Member
 
Join Date: Jun 2004
Posts: 13
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'
alient is offline   Reply With Quote
Old 18th May 2006, 23:02   #13
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Attached Files
File Type: txt exdll.txt (2.7 KB, 622 views)
Afrow UK is offline   Reply With Quote
Old 18th May 2006, 23:14   #14
alient
Junior Member
 
Join Date: Jun 2004
Posts: 13
awesome!
alient is offline   Reply With Quote
Old 19th May 2006, 23:01   #15
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Had little time today so I only added item icon support.
TreeView will come tomorrow.

-Stu
Afrow UK is offline   Reply With Quote
Old 19th May 2006, 23:05   #16
alient
Junior Member
 
Join Date: Jun 2004
Posts: 13
I will check in again next Monday. Thanks!
alient is offline   Reply With Quote
Old 22nd May 2006, 21:43   #17
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 22nd May 2006, 22:24   #18
alient
Junior Member
 
Join Date: Jun 2004
Posts: 13
Thanks for the update.
alient is offline   Reply With Quote
Old 23rd May 2006, 21:26   #19
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Should be done by tomorrow evening (GMT).

-Stu
Afrow UK is offline   Reply With Quote
Old 24th May 2006, 19:48   #20
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 25th May 2006, 15:04   #21
zeeh3
Senior Member
 
Join Date: Aug 2005
Posts: 121
This new version is very interesting, but has some bugs. The items selected are not shown correctly with MessageBox and single select allows multiselection
zeeh3 is offline   Reply With Quote
Old 25th May 2006, 15:07   #22
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I'll have a look soon. Basically ran out of time so I had to get it off my shoulders

-Stu
Afrow UK is offline   Reply With Quote
Old 25th May 2006, 16:27   #23
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Fixed the problems that you mentioned.
http://nsis.sourceforge.net/File:EmbeddedLists.zip

-Stu
Afrow UK is offline   Reply With Quote
Old 25th May 2006, 17:03   #24
alient
Junior Member
 
Join Date: Jun 2004
Posts: 13
Looking good! Thanks Stu!
alient is offline   Reply With Quote
Old 26th May 2006, 01:09   #25
zeeh3
Senior Member
 
Join Date: Aug 2005
Posts: 121
Almost perfect... all MultiColumn and some TreeView examples still not displaying correct selected items and TreeView Basic items can't be selected.
zeeh3 is offline   Reply With Quote
Old 26th May 2006, 07:35   #26
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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 is offline   Reply With Quote
Old 26th May 2006, 16:34   #27
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 26th May 2006, 17:52   #28
zeeh3
Senior Member
 
Join Date: Aug 2005
Posts: 121
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.
zeeh3 is offline   Reply With Quote
Old 26th May 2006, 18:35   #29
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
That is by design. If you would like support for selection I will add it.

-Stu
Afrow UK is offline   Reply With Quote
Old 26th May 2006, 18:44   #30
zeeh3
Senior Member
 
Join Date: Aug 2005
Posts: 121
Quote:
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
zeeh3 is offline   Reply With Quote
Old 26th May 2006, 19:15   #31
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
http://nsis.sourceforge.net/File:EmbeddedLists.zip

TreeView items are now selectable by default.
They cannot be selected with NoItemSelection=1.

-Stu
Afrow UK is offline   Reply With Quote
Old 3rd January 2007, 08:06   #32
DamagedGenius
Junior Member
 
Join Date: Dec 2006
Posts: 9
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.
DamagedGenius is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

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