I created a custom page which looks like that:
In my Installer I want that the textfield is only enabled wenn the Radiobutton with Single is clicked.
; Ini file generated by the HM NIS Edit IO designer.
[Settings]
NumFields=6
[Field 1]
Type=Groupbox
Text=Licence
Left=16
Right=227
Top=3
Bottom=78
[Field 2]
Type=RadioButton
Text=Demo
Left=26
Right=102
Top=32
Bottom=42
[Field 3]
Type=RadioButton
Text=Single
Left=26
Right=102
Top=46
Bottom=57
[Field 4]
Type=Text
Left=72
Right=202
Top=60
Bottom=73
[Field 5]
Type=Label
Text=Lizenzcode:
Left=26
Right=70
Top=62
Bottom=70
[Field 6]
Type=RadioButton
Text=Floating
Left=26
Right=102
Top=17
Bottom=27
I tried to change color for test purposes but nothing happend:
This is of course not the whole code but the main for the Custom Page.
!include LogicLib.nsh
Page custom licInfoDlg MyCustomLeave
Function MyCustomLeave
# Get control window handle.
!insertmacro INSTALLOPTIONS_READ $R0 "licInfoDlg.ini" "Field 1" "HWND"
# Check if text has been entered in field 1.
!insertmacro INSTALLOPTIONS_READ $R1 "licInfoDlg.ini" "Field 4" "State"
# Make field background red!
${If} $R1 == ""
SetCtlColors $R1 0x000000 0xFF0000
Abort # Go back to page.
# Reset field colours.
${Else}
SetCtlColors $R1 0x000000 0xFFFFFF
${EndIf}
FunctionEnd
How can I implement that the textfield becomes enabled or disabled when a special Radio button is clicked?
I looked for a tutorial but the one on NSIS Page did not help me.
I hope you can give me an Idea or or a code snippet how to make the script work.