/build/static/layout/Breadcrumb_cap_w.png

Dialog Design - Disable button if no text entered.

Hello All,

I have a hopefully simple and straightforward question about how to hide a button on a dialog when there is no text entered in a Edit box.

The scenario is that when our user install our software they are requested to enter in details into a Edit Field box which is assigned a property ("PXSERVERNAME"), should this ="" then the button is hidden.

This works upon loading the dialog as the Edit Field is blank by default, however when text is entered into the box then the button is still disabled. I can get this logic to work with other controls like the Radio/Check buttons however from reading the ControlEvents help it would appear that Edit fields react differently.

I suspect that the answer lies in the Subscribe/Publish event functions, however I dont seem to be able to marry the two.

Does anyone know how this is done?


Kind Regards

Paul

0 Comments   [ + ] Show comments

Answers (2)

Posted by: john.pirvu 11 years ago
Senior Yellow Belt
0
Hi Paul,

Unfortunately this is not supported by Windows Installer. To conditionally enable or disable controls you can use control conditions in ControlCondition table. However, the condition is evaluated when another control takes keyboard focus. So you cannot update another control while typing in an edit box. Subscribed events cannot be used because they designed for detecting internal installer operations and edit boxes cannot have published events.

I usually recommend some sort of Validate button which the user can press after typing so control conditions can work. A more complicated approach is to use an external UI which supports this.
Posted by: package_aligator 11 years ago
Orange Belt
0
Like John mentioned: ControlCondition Table is the fastest way out but not so reliable due to the control focus thing.

A different approach would be to condition the NewDialog event launched by the button with your property PXSERVERNAME.
In case PXSERVERNAME="" launch a message box asking for the edit field box to completed.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ