cervezas
6th January 2006 14:12 UTC
handling GUI events (button clicks, etc)
I'm a relative newbie to NSIS and thought I've spent a while searching for an answer to this I'm not coming up with anything. I'd like to be able to add a button to an installer page that would programatically select or deselect all items in a (long) list on that page. Is this possible?
cervezas
6th January 2006 14:17 UTC
Ok, on further searching I did find references to the testnotify.nsi example script, which sounds like it should enable event handling. I'll look at that. I guess the question that remains is whether (and how) I can set the selection state of the items in the list.
Anders
6th January 2006 16:57 UTC
assuming you are talking about a listbox, call SendMessage with LB_SETSEL in a loop ( http://msdn.microsoft.com/library/de.../lb_setsel.asp ) or use LB_SELITEMRANGEEX
cervezas
6th January 2006 17:36 UTC
I get it. So bottom line is that *all* this kind of GUI interaction is accomplished by using SendMessage to get the OS to do the work. Makes sense, I suppose. I mean, NSIS isn't supposed to be Visual Basic.
Thanks for your help.
Anders
6th January 2006 20:32 UTC
well, anything more advanced than SendMessage/ShowWindow/EnableWindow you need to use the system plugin, then you can call any api