The following works. Thank you very much for your help.

<Condition Action="disable"><![CDATA[(SFSPASSWORD <> SFSPASSWORD2) OR 
(SFSENVIRONMENT = "")]]></Condition>                      
<Condition Action="enable"><![CDATA[(SFSPASSWORD = SFSPASSWORD2) AND 
(SFSENVIRONMENT <> "")]]></Condition>

-----Original Message-----
From: Pally Sandher [mailto:pally.sand...@iesve.com] 
Sent: Friday, June 19, 2009 3:36 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to get the condition in a control right?


 
Try the following:

<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Text="!(loc.WixUINext)">
  <Publish Event="NewDialog"
Value="[WixUI_ConfigSFSDlg_Next]">1</Publish>
  <Condition Action="disable"><![CDATA[(SFSPASSWORD <> SFSPASSWORD2) OR
(SFSENVIRONMENT = "")]]></Condition>
</Control>

It should then be enabled if the passwords match or if the ComboBox has
a value selected but disabled otherwise. If you only want it to be
enabled only when the passwords match and the ComboBox has a value
selected, change the "OR" in the condition to "AND".

Good luck.

Palbinder Sandher 
Software Deployment & IT Administrator
T: +44 (0) 141 945 8500 
F: +44 (0) 141 945 8501 

http://www.iesve.com 
**Design, Simulate + Innovate with the <Virtual Environment>**
Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456 
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP
Email Disclaimer
 

 

-----Original Message-----
From: Jirong Hu [mailto:jirong...@gov.ab.ca] 
Sent: 18 June 2009 19:34
To: 'General discussion for Windows Installer XML toolset.'
Subject: [WiX-users] How to get the condition in a control right?

Hi

For this dialog, I want to diable the "Next" button when either password
doesn't match or ComboBox has no value selected. But the following code
doesn't check the value of ComboBox. How to fix this?

Thanks
Jirong

                <Control Id="Next" Type="PushButton" X="236" Y="243"
Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">
                                                <Publish
Event="NewDialog" Value="[WixUI_ConfigSFSDlg_Next]">1</Publish>
                                                <Condition
Action="disable"><![CDATA[SFSPASSWORD <> SFSPASSWORD2]]></Condition>
                                                <Condition
Action="disable"><![CDATA[SFSENVIRONMENT = ""]]></Condition>
                                                <Condition
Action="enable">SFSPASSWORD = SFSPASSWORD2</Condition>
        </Control>
<Control Type="ComboBox" ComboList="no" Width="136" Height="17" X="90"
Y="132" Id="CmbEnv" Property="SFSENVIRONMENT" Text="Development">
                                                <ComboBox
Property="SFSENVIRONMENT">
 
<ListItem Text="Integration" Value="Integration"/>
 
<ListItem Text="Integration 2" Value="Integration 2"/>
 
<ListItem Text="System Test" Value="System Test"/>
 
<ListItem Text="System Test 2" Value="System Test 2"/>
 
<ListItem Text="UAT" Value="UAT"/>
 
<ListItem Text="Production" Value="Production"/>
 
<ListItem Text="Production Support Test" Value="Production Support
Test"/>
 
<ListItem Text="Training" Value="Training"/>
 
<ListItem Text="Costing" Value="Costing"/>
                                                </ComboBox>
                                </Control> Thanks Jirong Hu Build Master
780-644-5488

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

This communication is intended for the use of the recipient to which it is 
addressed, and may contain confidential, personal, and or privileged 
information. Please contact us immediately if you are not the intended 
recipient of this communication, and do not copy, distribute, or take action 
relying on it. Any communication received in error, or subsequent reply, should 
be deleted or destroyed.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to