We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

mohan.raju
Posts: 3
Joined: Tue Jan 08, 2008 1:34 pm

Validate EditControls

Hi,

I have user name and password fields in a dialog. I want to check whether these fields are empty and if so i want to show an alert box that these fields are mandatory. Is there any example for that? I basically need an example for this.

And one more i have a combo. How can i add values to the combo?

Thanks,
Mohan Raju.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
I want to check whether these fields are empty and if so i want to show an alert box that these fields are mandatory.
Here are the steps to do this:
- go to the "Dialogs" page, select the Username edit box and go to the "Properties" section
- set the property of the Username edit box to USERNAME (in the "Property Name" field); note that this property is initialized to the user which runs the installation
- set the property of the Password edit box to PASSWORD
- in the "Custom Actions" page create a new "Script Inline" custom action under the "UI Custom Actions" sequence (for this example the custom action is named "ca")
- set the "Script Text" field to

Code: Select all

MsgBox "You must enter an Username and a Password"
- go to the "Dialogs" page and select the "Next" button
- in the "Published Events" tab make sure that you have these control events:

Code: Select all

DoAction    ca          (NOT USERNAME) AND (NOT PASSWORD)
NewDialog   FolderDlg   USERNAME AND PASSWORD
- you can create similar custom actions for the case in which only one field contains a value

You can read more about custom actions here:
http://www.advancedinstaller.com/user-g ... -page.html
Also, you can find more information about the Events editor here:
http://www.advancedinstaller.com/user-g ... ditor.html

If you need a sample project contact me at support at advancedinstaller dot com and I shall send it to you.
And one more i have a combo. How can i add values to the combo?
In order to add values to a combo box you double click it to show the "Control Data" dialog:
http://www.advancedinstaller.com/user-g ... ialog.html

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mohan.raju
Posts: 3
Joined: Tue Jan 08, 2008 1:34 pm

Hi,

Thanks for your reply. actually i need to fill the combo dynamically at runtime
by reading a text file. how can i do that?

Thanks,
Mohan Raju.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

There is a similar discussion on the forum, please take a look:
http://www.advancedinstaller.com/forums ... late+combo

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”