- NSIS Discussion
- Dynamic choice in RadioButton
Archive: Dynamic choice in RadioButton
anonym
12th January 2004 20:03 UTC
Dynamic choice in RadioButton
I'm using Modern UI
There are two RadioButtons and one FileRequest.
First RadioButton (Default) - Install new database
Second RadioButton - Select existing database
FileRequest assign with Second RadioButton.
How I can after select of file in FileRequest - enable Second RadioButton and disable First RadioButton?
Thank you
Joost Verburg
12th January 2004 20:11 UTC
Check the InstallOptions documentation for the NOTIFY flag.
deguix
12th January 2004 21:45 UTC
First you need to use "NOTIFY" flag in both radiobuttons (in the .INI file).
Second, see the example to how to create a basic code in the .nsi file in "Contrib\InstallOptions" subfolder of NSIS.
Third, if you mean "disable a control" use EnableWindow command to enable-disable any control when is selected a radiobutton.
anonym
13th January 2004 09:06 UTC
Thank you for your answers.
Sorry, I mean select Second RadioButton and unselect First RadioButton.
Where can I find of documentation about "NOTIFY" flag and EnableWindow command?
In the .nsi file in "Contrib\InstallOptions" subfolder of NSIS not enough information.
Thank you
Joost Verburg
13th January 2004 15:31 UTC
Information about NOTIFY can be found in the InstallOptions documentation, it calls the leave function when the control is changed.
EnableWindow is a NSIS command (use it in the leave function), for more information see the NSIS Users Manual.
anonym
14th January 2004 11:41 UTC
Sorry, but there is no information about "NOTIFY" flag into InstallOptions documentation in NSIS20b3 and NSIS20b4.
How I can declare leave function in my installation module?
Please, write example of using "NOTYFY" flag and leave function.
Thank you
Joost Verburg
14th January 2004 11:58 UTC
You should get the latest version, it's a new feature.
anonym
14th January 2004 14:14 UTC
I copied of version NSIS20b4 January, 13 2004
What latest version?
Thank you
anonym
14th January 2004 14:26 UTC
Thank you, I copied NSIS20rc2.
EnableWindow not approach.
I need to select (State=1) Second RadioButton but not disable.
Say me please, how to do it?
Thank you
Laslie
14th January 2004 14:27 UTC
NSIS20RC2
Joost Verburg
14th January 2004 14:56 UTC
See the testnotify.nsi in Contrib\InstallOptions.
anonym
14th January 2004 15:49 UTC
In testnotify.nsi in Contrib\InstallOptions there is no information about checking of RadioButton.
Next code not work:
FindWindow $hwnd "#32770" "" $HWNDPARENT
GetDlgItem ${TEMP} $hwnd 1202 ; 1202 - Second RadioButton
SendMessage ${TEMP} BM_SETCHECK BST_CHECKED 0
; and SendMessage $hwnd BM_SETCHECK BST_CHECKED 0
How I can check Second RadioButton?
Thank you
Joost Verburg
14th January 2004 16:28 UTC
You should defines for the window messages, like ${WM_SETTEXT}. For more of them see WinMessages.nsh.
anonym
14th January 2004 18:35 UTC
Thank you A LOT.
All works is excellent !!!