Dylan Moline (Volt) wrote: > Hey everyone, > > I am implementing a custom UI where I would like the user to either accept or > decline a radio button. I want the "next" button to be disabled until they > select EITHER option. I don't care if it is yes or no, I just want them to > make a decision. Here is the snippet and I can't seem to get it to evaluate > properly. > > <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" > Default = "no" Text="$(loc.WixUINext)"> > <Publish > Event="SpawnWaitDialog" Value="WaitForCostingDlg">CostingComplete = > 1</Publish> > <Publish Event="NewDialog" > Value="[WixUI_MUOptInDlg_Next]">MUAccepted = "yes" OR "no"</Publish> > <Condition > Action="disable"><![CDATA[MUAccepted <> "yes" OR "no"]]></Condition> > <Condition > Action="enable">MUAccepted = "yes" OR "no"</Condition> > <RadioButtonGroup Property="MUAccepted"> > <RadioButton Value="yes" Text="{\Bold}$(loc.MUAcceptedCheckBox)" > X="5" Y="0" Width="250" Height="20" /> > <RadioButton Value="no" Text="$(loc.MUDoNotAcceptCheckBox)" X="5" > Y="30" Width="250" Height="15" /> > </RadioButtonGroup> > > I've tried the disable condition of yes AND no... yes OR no... and I can't > seem to get it to work! > You condition of MUAccepted = "yes" OR "no" is always going to evaluate as true. Try an enable condition and new dialog condition of: MUAccepted = "yes" OR MUAccepted = "no" or you might find it clearer to put: (MUAccepted = "yes") OR (MUAccepted = "no")
The parenthesis is unneccessary but it can often help with future maintenance as it makes the intended operator precedence explicit. Your disable condition probably wants to be: <![CDATA[MUAccepted <> "yes" AND MUAccepted <> "no"]]> or: <![CDATA[(MUAccepted <> "yes") AND (MUAccepted <> "no")]]> or, you may find the following might also work NOT MUAccepted Hope this helps... Andrew -- Andrew Lee Solarflare Communications mailto:a...@solarflare.com http://www.solarflare.com/ ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users