Hide edit control when checkbox is checked in windows installer dialog
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.
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:
Dialog_: CustomTextA
Control_: Edit2
Action: Disable
Condition: USEWINAUTH=1
Dialog_: CustomTextA
Control_: Edit2
Action: Enable
Condition: USEWINAUTH<>1
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.
can you just set their Visible
attribute to false? Or hell, just set the Enabled
attribute to false.
精彩评论