Вопрос

When I create (try to create) a ComboBox in WiX, the box receives its initial value from the corresponding property's value set earlier in the .wxs-file. This far, everythings goes as planned. When I try to change its value graphically, it displays no available list items. I have not found any necessary or relevant attributes etc in the docs that I haven't used, but also I'm quite noobish on WiX so maybe have missed something obvious. The code is below:

       <Property Id="LANGUAGE" Value="Swedish" /> 
       ... cut ...
            <Control Type="ComboBox" ComboList="yes" Property="LANGUAGE" Id="languages_combo" Width="..." Height="..." X="..." Y="...">
                <ComboBox Property="LANGUAGE">
                    <ListItem Value="Swedish" />
                    <ListItem Value="English" />
                </ComboBox>
            </Control>

I want to be able to select "English" instead of "Swedish" in the drop-down, but that option is not available (and not "Swedish" for that matter - even that's the default value). Any suggestions how to solve this? I have searched the net without success, so I guess it's so basic no one has run into the same problem :-)

If it helps, here is the compilation:

candle test.wxs
light -ext WixUIExtension -sice:ICE20 test.wixobj

Attempts made by me:

  • Adding Text="..." to the ListItems does not help.
  • Replacing "ComboBox" with "ListBox" (and removeing attribute ComboList) displays the options/ListItems, but unfortunately ListBox is not the control that I want.
Это было полезно?

Решение

It's interesting when you make the same mistake over and over again, and never realize it's the good old mistake. I increased the Height attribute for Control, so the ListItems fit. Works like a charm!

Другие советы

I think you need to set the visible displayed text on the ListItems.

Try this:

  <ComboBox Property="LANGUAGE">
    <ListItem Text="English" Value="English" />
    <ListItem Text="Swedish" Value="Swedish" />
  </ComboBox>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top