PDA

View Full Version : Custom Dialog Edit Box



StripedCat
09-24-2015, 11:21 AM
In a custom dialog box, how do I detect that the cursor is no longer in the Edit Box? For example, the user enters a password and tabs out of the box into the next edit box. I want to validate the password as soon as they type the password and leave that edit box. I already have a program to validate the password; the issue is detecting when the user has typed something and left the edit box. Thank you.

DLee65
09-25-2015, 01:49 PM
It looks like you can only perform validation when switching to a different control. The wait on dialog event will return the control ID. So basically you have to map events for all of your controls, and within that control check to see if your password value has changed. If it has changed then check the changed value. Make sure your Next button is disabled until password / key is valid.

It has been a very long time since I have ever handled a custom InstallScript dialog. Hopefully this will work for you?

If you are using a Basic MSI dialog then you might be able to trigger events when a property changes. But it sounds as if you are using InstallScript.

StripedCat
10-08-2015, 04:35 PM
I appreciate your help Dan. Yes, I am using InstallScript. I haven't been able to get this to work the way I want yet. i.e. I can't get the validation to occur as soon as the cursor leaves the password edit box. I can get it to occur when I start typing in the next edit box, but not when the cursor leaves the password box. If you have anything else to add, I'd appreciate it.