问题描述
我已经尝试了几天,但没有任何想法。 基本上,我想要的是拥有一个具有不同变量名的comBoxBox,然后按下“添加”按钮,会弹出一个新的编辑/输入字段,我可以在其中输入一些值,然后将其添加到某些配置文件中。
困难的部分是通过按下按钮来添加此编辑字段,并从组合框中分配变量名称。我尝试了无数次操作(条件,启用/禁用,隐藏/显示,重新加载对话框...),我开始怀疑是否可以使用WiX做到这一点。\
这是我的Ui文件的一部分:
<UI>
<!--Dialog to set all Config Variables-->
<Dialog Id="ConfigVariablesDlg" Width="370" Height="270">
<!--ComboBox to choose Variable to add-->
<Control Type="ComboBox" Property="VariabletoAdd" Id="VariablesComboBox" Width="160" Height="16" X="8" Y="90">
<ComboBox Property="VariablesToAdd">
<ListItem Text="Var1" Value="Var1Field"/>
<ListItem Text="Var2" Value="Var2Field"/>
<ListItem Text="Var3" Value="Var3Field"/>
</ComboBox>
</Control>
<Control Type="PushButton" Id="AddVariableButton" Width="56" Height="17" X="180" Y="90" Text="Add">
<Publish Property="[VariabletoAdd]" Value="True" Order="1" />
<Publish Event="NewDialog" Value="ConfigVariablesDlg" Order="2" />
</Control>
<!--Conditional Variable Input Fields-->
<Control Type="Edit" Id="Var1Input" Property="VAR1" X="56" Y="11" Width="100" Height="15">
<Condition Action="enable">Var1Field="True"</Condition>
<Condition Action="disable">Var1Field="False"</Condition>
</Control>
<Control Type="Edit" Id="Var2Field" Property="VAR2" X="56" Y="34" Width="100" Height="15">
<Condition Action="enable">Var2Field="True"</Condition>
<Condition Action="disable">Var2Field="False"</Condition>
</Control>
<Control Type="Edit" Id="Var3Field" Property="VAR3" X="56" Y="60" Width="100" Height="15">
<Condition Action="enable">Var3Field="True"</Condition>
<Condition Action="disable">Var3Field="False"</Condition>
</Control>
非常感谢您的帮助和提示!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)