Wix安装程序 - 更改组合框值基于单选按钮更改

时间:2015-05-13 13:14:12

标签: combobox wix windows-installer installer msi-gui

在下面的代码中,我尝试在选择Radiobutton时更改组合框值,但它没有改变

<Control Id="radioButtonGroupBox1" Type="RadioButtonGroup" 
         Property="INSTALL_CUSTOMSCALE" Height="34" Width="64" X="48" Y="99">
        <RadioButtonGroup Property="INSTALL_CUSTOMSCALE">
            <RadioButton X="5" Y="2" Height="15" Width="56" 
                                Text="Custom" Value="Custom" />
            <RadioButton X="5" Y="18" Height="15" Width="56" 
                                Text="Scaleout" Value="Scaleout" />
        </RadioButtonGroup>
         <Publish Property="CUSTOM_OPTION" Value="Server1" ></Publish>      

 </Control>
<Control Id="cmbCustomOption" Type="ComboBox" Property="CUSTOM_OPTION" 
             Height="16" Width="166" X="116" Y="101" >
    <ComboBox Property="CUSTOM_OPTION">
        <ListItem Text="Select..." Value="Select..."   />
        <ListItem Text="Server1" Value="Server1" />
        <ListItem Text="Server2" Value="Server2" />
        <ListItem Text="Server3" Value="Server3" />
        <ListItem Text="Server4" Value="Server4" />
    </ComboBox>

</Control>

以及如何设置Combobox不可编辑(只读)

1 个答案:

答案 0 :(得分:0)

设置组合框不可编辑只需添加&#34; 组合列表=是&#34;

<Control Id="cmbCustomOption" Type="ComboBox" Property="CUSTOM_OPTION" Height="16" 
          Width="166" X="116" Y="101" ComboList="yes">
          <ComboBox Property="CUSTOM_OPTION">
            <ListItem Text="Select..." Value="Select..."   />
            <ListItem Text="Server1" Value="Server1" />
            <ListItem Text="Server2" Value="Server2" />
            <ListItem Text="Server3" Value="Server3" />
            <ListItem Text="Server4" Value="Server4" />
          </ComboBox>
</Control>