View Full Version : Enabling/Disabling dialog components
01-06-2003, 04:44 AM
Can anyone tell me if it is possible to enable/disable dialog box components with Installscript? I can't finad anything in the Installscript help on this one. :confused:
I have a SQL Server setup box, and prompt the user with radio buttons to select Windows or SQL authentication. I want to disable the input fields for username and password if the user selects Windows Authentication (as I don't need these values) and enable them if SQL Server authentication is selected.
Thanks in advance,
01-06-2003, 11:31 AM
Yes, you can, using the EnableWindow API function. For an example, see the source code for SdRegisterUser, available in ...\Developer\Script\isrt\src\Sdregu.rul; this dialog box disables the Next button until all edit fields contain text.
There is also an example in Chapter 12 of Getting Started with InstallShield Developer and Windows Installer Setups, about which see http://www.installshield.com/news/books/windows-installer-setup/default.asp.
01-07-2003, 06:50 AM
Is it possible to do this with an MSI project? I need to disable the next button until the user has entered the required data into edit fields.
01-07-2003, 09:13 AM
Is there any way I can group my Dialog Items, or do I have to enable/disable each one individually?
01-07-2003, 09:47 AM
I believe you have to enable or disable each individual item.
Alas, MSI evidently throws away edit-field-changed messages, so it's apparently not possible to disable a button until all edit fields contain text, at least without tricking the user into changing the focus by providing a "Validate" button or some such thing.
01-07-2003, 02:12 PM
If you put the prompt for user/pwd in a separate dialog, then you could conditionally show that dialog based on the response in the previous Authentication Mode dialog.
Not an elegant solution, granted, but it seem the only way to control whether the prompt is 'enabled' or not.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.