2

I would like to create a custom page using nsDailogs that is similar to the Components Page in MUI. It should have a scrolling section that will contain the list of CheckBoxes. The list will be populated at runtime depending on the programs already installed on the computer. I would like to include the scroll pane because the list may become too long to show on the screen.

Is there some way to create a ListBox and add CheckBoxes to it similar to adding Strings to it? Forum thread for adding Strings to ListBox: http://forums.winamp.com/showthread.php?threadid=276367

Thanks for the help!

woestman
  • 125
  • 1
  • 8

1 Answers1

1

A listbox does not support checkboxes, the listview control however does have checkbox support. You can find a header file for it on the wiki, there is also a plugin you could take a look at.

Checkboxes can also be emulated by using a imagelist in a listview or treeview. (NSIS does this because native listview checkboxes are not supported on Win95)

Anders
  • 97,548
  • 12
  • 110
  • 164
  • The listview header does exactly what I want! I've adapted one of the examples to do what I want. Unfortunately, I'm having trouble getting it to work properly with NSIS Unicode. (I have Japanese LangStrings in Unicode.) For some reason when adding a string to the list view (as a column header or item) it only adds the first character of the string. Everything but the LangStrings work fine if I change my file to ANSI and use non-unicode NSIS. Any idea how I can fix or get around this? – woestman Nov 12 '12 at 19:04
  • Probably a wrong string type in one of the system calls, "t" should work on most places, if not, use "w". Some of the messages have A and W versions, it is important that the LV* struct with the string matches the message... – Anders Nov 12 '12 at 21:32
  • Take a look at http://nsis.svn.sourceforge.net/viewvc/nsis/NSIS/trunk/Include/WinMessages.nsh it has been updated with support for insertitemA/W messages... – Anders Nov 12 '12 at 21:39