使用 WiX 如何根据属性更改禁用/启用控件?
当我有一个 WiX 组合框并且当我更改选择时我想禁用/启用其他 UI 控件时,我的大脑有点融化。
<ComboBox Property="SQLAUTHTYPE">
<ListItem Value="WindowsAuth" Text="Windows Authentication" />
<ListItem Value="SqlAuth" Text="SQL Authentication" />
</ComboBox>
也就是说,当这些事件被触发时...
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'.
以下 UI 控件在选择 WindowsAuth 时被标记为禁用,在选择 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" />
I'm having a bit of a brain melt at the moment where I have a WiX Combobox and when I change the selection I want to disable/enable other UI controls.
<ComboBox Property="SQLAUTHTYPE">
<ListItem Value="WindowsAuth" Text="Windows Authentication" />
<ListItem Value="SqlAuth" Text="SQL Authentication" />
</ComboBox>
That is when these events are triggered ...
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'.
The following UI controls are flagged as disabled when WindowsAuth is selected and enabled when SqlAuth is selected...
<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" />
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这应该可以做到:
This should do it: