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

0 Comments   [ + ] Show Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


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.
Answered 06/22/2010 by: john.pirvu
Senior Yellow Belt

Please log in to comment
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.
Answered 06/23/2010 by: package_aligator
Orange Belt

Please log in to comment
Answer this question or Comment on this question for clarity