Archive: Disable/enable Fields in Form


Disable/enable Fields in Form
Hello everybody,

I want to know now how i can disable for example field 6 when in the Droplist menue "Demoversion" is choosen so that the user notices that he has not to enter anythink?
I searched for examples but could not find some.

All I am asking for is whether the user want to install in demo mode, enter a key or enter IP of an server which manages the licences.

Here is the code of the form. It looks like this:


; Ini file generated by the HM NIS Edit IO designer.
[Settings]
NumFields=6

[Field 1]
Type=Label
Text=Lizenztyp:
Left=20
Right=63
Top=4
Bottom=14

[Field 2]
Type=Droplist
Text=Droplist
State=Demoversion
ListItems=Demoversion|Lizenzserver|Seriennummer|Netzwerkadresse
Left=65
Right=195
Top=1
Bottom=94

[Field 3]
Type=Label
Text=Lizenzserver:
Left=20
Right=63
Top=20
Bottom=28

[Field 4]
Type=Text
Left=65
Right=195
Top=17
Bottom=30

[Field 5]
Type=Label
Text=Lizenzcode:
Left=20
Right=63
Top=36
Bottom=44

[Field 6]
Type=Text
Left=65
Right=195
Top=33
Bottom=46



In my install-script I implement this form like that :


Function licInfoDlg

!insertmacro MUI_HEADER_TEXT $(title_Licence_Mode) $(Licence_Mode)
!insertmacro INSTALLOPTIONS_DISPLAY "licInfoDlg.ini"

FunctionEnd


I would appreciate your help for any tips, examples or links to examples.


Thank you

Get the control's HWND by reading it from the page's INI at runtime ad then use an EnableWindow command.

There are plenty of examples of this in the forum. Just do some searches to find them. (There's probably more examples in your NSIS examples directory too).