How to get values from ListBox

Posts: 10
Joined: June 9, 2014 - 21:07
How to get values from ListBox

Hey guys,

How can I retrieve the selected lines in a ListBox control?

Eg:

I have a list box with a bunch of lines in it, I want to do the folowwing:

Check each line if selected and if selected replace a line in an INI file.

Any ideas?

Posts: 10
Joined: June 9, 2014 - 21:07
Re: How to get values from ListBox

I just noticed that the listbox control doesn't allow multiple selection, or at least I don't see it in the properties of it, is there any control that does allow that?

Thanks.

Posts: 1125
Joined: March 25, 2012 - 01:19
Re: How to get values from ListBox

The best place to look for is the official NSIS forum.

As for your questions:

Retrieve selected item of a listbox
Multiselect listbox

I'll have a look to check if I can add Multiselect property to listbox.

Posts: 10
Joined: June 9, 2014 - 21:07
Re: How to get values from ListBox

Thanks, I will chek the links whan I have some time.

On the other hand, would it be too much to ask if instead of a ListBox control, a CheckList (List of checkboxes) Control be implemented?

Thanks again.

Posts: 1125
Joined: March 25, 2012 - 01:19
Re: How to get values from ListBox

CheckedListBox is really a nightmare to create and, also, to fill up and manage once created.
Actually there's no macro in nsDialogs to create it.

Take a look at these forum threads, where you can find some suggestions and a plugin to create and use your control. Beware, it won't be easy... ;)

http://forums.winamp.com/showthread.php?t=299003

http://nsis.sourceforge.net/EmbeddedLists_plug-in

http://nsis.sourceforge.net/Header_file_for_Listview

warning

Warning, JavaScript is disabled!

JavaScript is not available, maybe because you disabled it globally into your browser settings or you are using an addon like NoScript.

We do not have any dangerous JavaScript running here.
Please enable JavaScript; if you're using NoScript this image will help you adding CoolSoft to your whitelist.

Thanks for your comprehension and enjoy CoolSoft.