How to get values from ListBox

It seems you're using an AdBlocker or JavaScript is disabled!

This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).

This 10 seconds wait is to let you update your AdBlocker whitelist...

Got it, show me the content...
Please enable JavaScript!
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: 1541
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: 1541
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