根据属性初始化wix CheckBox的检查状态?
如何根据属性的值初始化 Wix 复选框?
到目前为止,我已经完成了以下操作:
<Control Id="Checkbox" Type="CheckBox" X="0" Y="0" Width="100" Height="15" Property="CHECKBOX_SELECTION" Text="I want this feature" CheckBoxValue="1" TabSkip="no">
<Condition Action="hide">HIDE_CHECKBOX</Condition>
<Condition Action="show">NOT HIDE_CHECKBOX</Condition>
</Control>
目前我有两个自定义操作来设置 HIDE_CHECKBOX 和 CHECKBOX_SELECTION。 CHECKBOX_SELECTION 自定义操作在 HIDE_CHECKBOX 操作之后立即发生。
我看到的是 HIDE_CHECKBOX 行为正确(即复选框被隐藏),这表明我的自定义操作顺序正确,但 CHECKBOX_SELECTION 没有更改复选框的选中状态。这是一个安全的假设吗?另外,我已确认日志中的 SELECTION 设置为“1”。
我走在正确的轨道上吗?我错过了什么吗?
How does one initalise a Wix check box based on the value of a property?
So far, I've done the following:
<Control Id="Checkbox" Type="CheckBox" X="0" Y="0" Width="100" Height="15" Property="CHECKBOX_SELECTION" Text="I want this feature" CheckBoxValue="1" TabSkip="no">
<Condition Action="hide">HIDE_CHECKBOX</Condition>
<Condition Action="show">NOT HIDE_CHECKBOX</Condition>
</Control>
Currently I have two custom actions to set HIDE_CHECKBOX and CHECKBOX_SELECTION. The CHECKBOX_SELECTION custom action occurs immediately after the HIDE_CHECKBOX action.
What I'm seeing is that HIDE_CHECKBOX is behaving correctly (ie. the checkbox is hidden) which suggests that I've got the ordering of custom actions correct, but CHECKBOX_SELECTION is not changing the check state of the check box. Is this a safe assumption? Also, I've confirmed that SELECTION is being set to '1' in the logs.
Am I on the right track? Have I misssd anything?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
显示属性更改的日志片段会有很大帮助。如果缺少这一点,我将使用我的神奇八球,它注意到一些可能只是您问题中的拼写错误,但建议:
它真的是被标记为 1 的 SELECTION 属性吗?如果是这样,则与复选框所基于的
CHECKBOX_SELECTION
属性不匹配并解释所有问题。A snippet of the log showing the property changes would help a lot. Lacking that, I'll use my magic eight ball which noticed something that might just be a typo in your question but suggests:
Is it really the
SELECTION
Property that is getting marked to 1? If so that would not match theCHECKBOX_SELECTION
Property the checkbox is based on and explain all the problems.