Disable text box in dialog on Checkbox clicked - Advanced Installer Community

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!

dms
Posts: 164
Joined: Tue Aug 28, 2007 7:11 am
Location: UK

Disable text box in dialog on Checkbox clicked

Hi

I'm sure I've seen the answer to this in the forums, but no matter on what I search I can't find it.

Anyway I have a modified dialog that browses for sql servers. there's a combo box that lists those found (works well) a check box to check if a trusted connection is to be used and text boxes to enter username and password if a trusted connection is not to be used.

I need the checkbox checked and the two text boxes disabled on dialog entry (making the basic assumption that a trusted connection is to be used) and the two disabled text boxes to become enabled if the user unchecks the check box (thus allowing them to enter a username and password).

What's the best way to achieve this and does there happen to be an example somewhere. As I say I thought I'd seen this somewhere but I really can't find it at present.

Dom
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Disable text box in dialog on Checkbox clicked

Hi Dom,

You're looking for control conditions. Just follow the linked article and let us know if you have any queries.
For the checkbox to be initially checked, just set its "Default Value" in the "Properties" pane on the right.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”