Skip to content
⌘ NSIS Forum Archive

Dynamically changing the droplist items

7 posts

anz#

Dynamically changing the droplist items

I'm use Modern UI and InstallOptions. It is needed to change a droplist at current page. MUI_INSTALLOPTIONS_WRITE not works until page refresh through Next-Back. I'd like to do this in form 'a|b|c'.
Afrow UK#
When you mean dynically, do you mean when the user clicks on a button or another control, or while he/she is viewing the page?

-Stu
Afrow UK#
In which case, add the Flags=NOTIFY key & value to the button field. See the testnotify.nsi example script in Examples\InstallOptions.

-Stu
anz#
The problem is not in event handling. I can not change the content of droplist at the page after dialog was created. There is no place at the pointed example where items of droplist are changed. But text fields are changed by using "SendMessage WM_SETTEXT". There was an example in this forum where it was suggested to use "SendMessage CB_INSERTSTRING". But that example does not work because of exception.
Afrow UK#
What is the exact code that you have tried?
Are there any compiler warnings generated by the compiler?

-Stu
anz#
Ok. It's works with CB_INSERTSTRING. Exception raised if "STR:" was not specified in SendMessage param.

Thanks for help.