none
ComboBox control in dialog (WiX) RRS feed

  • Question

  •  

    Hi all!

    I develop with Wix and face the next problem: when I run this dialog, no language selected by default. How can i set default text?

    Here is a dialog:

    <?xml version="1.0" encoding="UTF-8"?>

    <!--

    Copyright (c) Microsoft Corporation. All rights reserved.

    -->

    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

    <Fragment>

    <Binary Id="LanguageDlgIcon" SourceFile="c:\hicon.bmp" />

    <UI>

    <!--<ComboBox Property="SetupLanguageList">-->

    <ComboBox Property="SETUPLANGLIST">

    <ListItem Text="English" Value="1033" />

    <ListItem Text="Spanish" Value="3082" />

    <ListItem Text="Japanese" Value="1041" />

    </ComboBox>

    <Dialog Id="LanguageChooseDialog" Height="97" Width="217" Title="Installer Language" NoMinimize="yes">

    <Control Id="LanguageChooseIcon" Type="Bitmap" X="8" Y="10" Height="32" Width="32" Text="LanguageDlgIcon" FixedSize="yes" IconSize="32">

    <Binary Id="HIcon" SourceFile="c:\hicon.gif" />

    </Control>

    <Control Id="LanguageChooseLabel" Type="Text" X="52" Y="13" Width="125" Height="10" Text="Please select a language." />

    <Control Id="LanguageChooseComboBox"

    Type="ComboBox" X="52" Y="48"

    Width="156" Height="10" ComboList="yes"

    Property="SETUPLANGLIST" Sorted="no"

    RightToLeft="yes">

    <Text>English</Text>

    </Control>

    <Control Id="LanguageChooseOk" Type="PushButton" X="85" Y="73" Width="57" Height="17" Text="OK" Default="yes"/>

    <Control Id="LanguageChooseCancel" Type="PushButton" X="152" Y="73" Width="57" Height="17" Text="Cancel">

    <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>

    </Control>

    </Dialog>

    </UI>

    </Fragment>

    </Wix>

     

    Thanks!

    Wednesday, April 16, 2008 9:42 AM

Answers

  •  

    Hi patriot10,

    The Text attribute for ComboBox element is only used to set text style. You cannot use this to set the default for a ComboBox control.

    I think you need to use a custom action to set the default value for the ComboBox. And since your problem is related a third party tool, you can post your question on some forum for the Wix tool for better response.

    For more information, please check:
    http://wix.sourceforge.net/manual-wix2/wix_xsd_control.htm

    Hope this helps.
    Best regards.
    Rong-Chun Zhang

    Tuesday, April 22, 2008 7:02 AM
  • Hi Patriot10,

    try to set the default value to the property instead to the ComboBox or the control e.g.

    <Property Id="SETUPLANGLIST" Value="English"/>


    HTH, Cheers Volker


    Friday, May 30, 2008 12:54 PM

All replies

  •  

    Hi patriot10,

    The Text attribute for ComboBox element is only used to set text style. You cannot use this to set the default for a ComboBox control.

    I think you need to use a custom action to set the default value for the ComboBox. And since your problem is related a third party tool, you can post your question on some forum for the Wix tool for better response.

    For more information, please check:
    http://wix.sourceforge.net/manual-wix2/wix_xsd_control.htm

    Hope this helps.
    Best regards.
    Rong-Chun Zhang

    Tuesday, April 22, 2008 7:02 AM
  • Thanks for answer. I'm afraid you right. It is sad that there is no standart method to set default value because it's logical that some value in combo box must be choosen by default. Even if it is "Choose one please...".

     

    Friday, April 25, 2008 4:19 AM
  • Hi Patriot10,

    try to set the default value to the property instead to the ComboBox or the control e.g.

    <Property Id="SETUPLANGLIST" Value="English"/>


    HTH, Cheers Volker


    Friday, May 30, 2008 12:54 PM
  • Thank u very much! This is really works! You are the first hwo help me! Smile 

    Saturday, May 31, 2008 8:25 AM
  • Hi Patriot,
    Can you please share your project ,I am really struggling for that particular requirement.(multilingual installer)

    Thanks,
    Patro
    Wednesday, December 2, 2009 4:49 PM
  • I think that there is some confusion between text and value.
    I think you really meant
    <Property Id="SETUPLANGLIST" Value="1033"/> 
    as 1033 is the value which has the text English?
    Friday, December 11, 2009 4:23 PM
  • Add this code line:

     

    <Property Id="SETUPLANGLIST">1033 </Property>

     

    In this way, in youre code example, the default string language displayed is English. (3082 for Spanish and 1041 for Japanese).

    Tuesday, October 19, 2010 1:30 PM