cai_sebas
23rd October 2005 16:49 UTC
Rare coding
I want to code something that has gone to high for me. I have a custompage with some nice things on it. One of them are three sets of radio buttons.
I want when a radio button is selected a file is renamed.
For radio 1 a other renaming then for radio 2.
How to do this? Thanks in advanced I searched on Wiki and the Forum but nothing came up usefull for me...
kichik
24th October 2005 13:26 UTC
The examples in Examples\InstallOptions check if a check box is checked. It's the same check for a radio button. They both set State to either 1 or 0.
cai_sebas
24th October 2005 13:42 UTC
Okay nice i get it, One thing left whats seems very difficult to me.
I want the Next/Install button be grayed out till one of the checkboxes are checked (a bit like a license page) How do I do this?
Thanks
kichik
24th October 2005 13:51 UTC
To disable the Next button, use GetDlgItem and EnableWindow after you initialize the custom page and before you show it.
To enable it according to a specific checkbox, you need a leave callback function and the NOTIFY flag. In the function, check the status using SendMessage (the INI isn't updated) and enable the button accordinly. Examples\InstallOptions\testnotify.nsi shows you how.