2010-02-03 18 views
7

Estoy teniendo un poco de derretimiento cerebral en el momento en que tengo un Combobox de WiX y cuando cambio la selección quiero desactivar/habilitar otros controles de UI.Uso de WiX ¿Cómo desactivo/habilito los controles según el cambio de propiedad?

<ComboBox Property="SQLAUTHTYPE"> 
    <ListItem Value="WindowsAuth" Text="Windows Authentication" /> 
    <ListItem Value="SqlAuth" Text="SQL Authentication" /> 
    </ComboBox> 

Eso es cuando se activan estos eventos ...

MSI (c) ... PROPERTY CHANGE: Modifying SQLAUTHTYPE property. Its current value is 'WindowsAuth'. Its new value: 'SqlAuth'. 
    MSI (c) ... PROPERTY CHANGE: Modifying SQLAUTHTYPE property. Its current value is 'SqlAuth'. Its new value: 'WindowsAuth'. 

Los siguientes controles de interfaz de usuario se marcan como inhabilitados cuando se selecciona WindowsAuth y habilita cuando se selecciona SQLAuth ...

<Control Type="Edit" Width="164" Height="16" X="25" Y="149" Id="SQLAccountTextbox" Property="SQLACCOUNT" 
    <Control Type="Edit" Width="164" Height="16" X="190" Y="148" Id="SQLPasswordTextbox" Property="SQLPASSWORD" Password="yes" /> 

Respuesta

12

Esto debe hacerlo:

<Control Type="Edit" Width="164" Height="16" X="190" Y="148" Id="SQLPasswordTextbox" Property="SQLPASSWORD" Password="yes"> 
    <Condition Action="enable">SQLAUTHTYPE = "SqlAuth"</Condition> 
    <Condition Action="disable">SQLAUTHTYPE = "WindowsAuth"</Condition> 
</Control> 
+0

Perfecto. No sé por qué no pude ver eso. – JTew

Cuestiones relacionadas