Skip to content
⌘ NSIS Forum Archive

handling GUI events (button clicks, etc)

5 posts

cervezas#

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#
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#
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#
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#
well, anything more advanced than SendMessage/ShowWindow/EnableWindow you need to use the system plugin, then you can call any api