View Full Version : How to validate Edit box
01-17-2005, 05:25 AM
I am using Installshiled develper 7.01
I created a basic MSI project. I then created a Custom dialog box with few edit boxes. I was able to display the dialog box. (i added it in the sequence/action).
How do I validate the values i enter into the edit box of this dialog
01-17-2005, 08:17 AM
Depending on the type of validation that you want to do on the values, it me be very simple or complex. If you just want to make sure that the user has entered something in an edit box before allowing them to more the the next dialog, just add a condition to the Next button for the NewDialog control event. It would be something like EDIT1<>"".
But, if you need to do more complex validation, then you will need to create a custom action to do that. The custom action should be added to the Next button. Add a DoAction control event and add the name of the action you want to run. The action should set a property that you can use on the NewDialog control event to determine if the user can move to the next dialog.
For example you might have the following control events for checking a password.
DoAction ValidatePassword 1
NewDialog ReadyToInstall ValidPassword=1
01-25-2005, 11:41 PM
Thanks guys I managed to make some checks...
09-07-2007, 05:19 AM
But how to update button status during type?
Button state not changed until focus remains in edit.
I have following problem:
Dialog, Next button and empty edit. Next button disabled by default.
Two conditions added for button:
Disabe IS_SQLSERVER_DATABASE = ""
Enable IS_SQLSERVER_DATABASE <> ""
I put focus in edit, type. Button status not changed to enabled. Only if i move focus to another control Next status will be changed to Enabled.
How to overcome this?
10-20-2009, 05:40 PM
I am having the same problem. I have set conditions on the next button to check an Edit Control for a value but the event does not fire until the user clicks out of the Edit Control i.e. - the edit control looses focus. Is there a way to tie into the textchanged event of the Edit Control so as soon as the user enters a value into the Edit Control the button becomes enabled and they do not have to click on another control to enable the button.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.