views:

19

answers:

1

I created a custom dialog page in wix and it has a text box. I want to disable the next button of the installer if the text box is empty end enable it if the user has typed a value. The following code works partially. It does not disable the next button but it does not navigate to the next page unless you fill the value. The problem I have is that the status of the next button is not updated while you are typing a value in the edit text box. If I remove the value from the edit text box and then click back to the previous screen and then next, the next button is disabled.

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"&gt;
 <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>
A: 

The answer is the same as here.

Yan Sklyarenko