在 Windows 安装程序对话框中选中复选框时隐藏编辑控件
我有一个对话框,下面有一个复选框和两个编辑字段。我希望在选中复选框后编辑字段变灰或禁用。我知道这是可能的通过添加MSI 中 ControlCondition 表的条目,但我不知道该条件使用什么,也找不到任何带有 Windows 安装程序复选框的示例。
我知道我已经很接近了。有什么想法吗?
编辑:我试图在安装程序项目中执行此操作,因此我无法直接访问对话框代码。相反,我尝试在 Orca 等 MSI 编辑器中编辑对话框。
I have a dialog box with a checkbox and two edit fields beneath it. I want the edit fields to be grayed out or disabled as soon as the checkbox is checked. I know this is possible by adding an entry to the ControlCondition table in the MSI, but I don't know what to use for the Condition and I can't find any examples with checkboxes for windows installer.
I know I'm close. Any ideas?
EDIT: I am trying to do this in an installer project, so I don't have access to the Dialog code directly. Instead I'm trying to edit the Dialog in an MSI editor like Orca.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将其
Visible
属性设置为 false 吗?或者见鬼,只需将Enabled
属性设置为 false 即可。can you just set their
Visible
attribute to false? Or hell, just set theEnabled
attribute to false.好吧,我想通了。我比我想象的更接近!
使用 Orca,我有一个名为 Checkbox1 的复选框,其属性设置为 USEWINAUTH。
现在,在 ControlCondition 表中,我添加了 4 个条目:
然后对其他 Edit 控件重复此操作。
我最终将使用脚本来完成此操作,这样我就不必在每次构建项目时都使用 Orca 手动编辑 MSI。
Alright I figured it out. I was closer than I thought!
Using Orca, I had a checkbox called Checkbox1 with Property set to USEWINAUTH.
Now, in the ControlCondition table, I added 4 entries:
And then repeat for the other Edit control.
I'll end up doing this with a script so I don't have to edit the MSI by hand with Orca every time I build the project.