I created a custom dialog page on wix and it has a text box. I want to disable the next installer button, if the text field is empty, enable it if the user typed a value. The following code works partially. It does not disable the next button, but does not go to the next page if you do not fill in this value. The problem is that the status of the next button is not updated when you enter a value in the edit text box. If I remove the value from the edit text box, and then return to the previous screen, and then the next button will be disabled.
<?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Fragment> <UI> <Dialog Id="MyCustomDialog" Width="370" Height="270" Title="Custom Dialog Options"> <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="Next"> <Condition Action="disable">USERNAME1 = ""</Condition> <Condition Action="enable">NOT(USERNAME1 = "")</Condition> <Publish Event="NewDialog" Value="VerifyReadyDlg">NOT(USERNAME1 = "")</Publish> </Control> <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="Back"> <Publish Event="NewDialog" Value="CustomizeDlg">1</Publish> </Control> <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel"> <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish> </Control> <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="Please type the value" /> <Control Id="UserNameText" Type="Text" X="20" Y="60" Width="290" Height="13" NoPrefix="yes" Text="Please type the username" /> <Control Id="UserNameEdit" Type="Edit" X="20" Y="72" Width="290" Height="18" Multiline="no" Property="USERNAME1"/> </Dialog> </UI> </Fragment> </Wix>
user-interface controls condition wix
Ioannis
source share