Antarctica
Posts: 110
Joined: Tue Jul 08, 2014 9:24 am

Combobox: Text vs. values

Regarding combobox values in AI 14.5, I have [s]two[/s] three questions:

1) How can I translate texts displayed in the combobox dropdown menu?

2) The text in the combo is the value, not the text: https://i.imgur.com/CZCr7W5.png
Can I change this somehow?

3) The values in the combo are automatically sorted by the text. How can I either have them unsorted or sorted by value?
(Hint: The value of the "Sort by index" attribute on the combobox is "false".)
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Combobox: Text vs. values

Hello,

1. This can be done by dynamically populate the combo box at install time. For instance you could set the texts localized depending on the "ProductLanguage" property value.

2. This is the Windows Installer design. The text is only displayed when expanding the combo. After selecting an item its value will be displayed.

3. The only way would be to set the "Sort by index" attribute to "True" and make sure the items are added/populated in the combo box in the order you need (e.g. to be sorted by value). In this case the first added/populated item will be displayed first and so on. However in this case the order in which they are added/populated should be computed by you.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lesliehedzg
Posts: 13
Joined: Tue Jul 24, 2018 10:05 pm

Re: Combobox: Text vs. values

I need three static values ​​of text in my combo box, how can I do that?
Thank you
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Combobox: Text vs. values

Hello,

In order to achieve this, you can right-click on your combo box, use the "Control Data" option, then add the desired items with text and values, in the new dialog that appears.

Let me know if this helped.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lesliehedzg
Posts: 13
Joined: Tue Jul 24, 2018 10:05 pm

Re: Combobox: Text vs. values

thank you so much, it works!


I have another question, I created my uninstallation dialogs, but I do not understand where I configure that I need them when the user wants to uninstall the program and that these dialogs appear. How do I attach them to my project? Where do I configure the action I require?


best regards,
Leslie
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Combobox: Text vs. values

You're welcome Leslie. I'm glad it worked.

To display some dialogs during the uninstall of your product you need to first go in the "Dialogs" page and add them under the "Maintenance -> MaintenanceTypeDlg -> InstallMode='Remove'".

Then, go to the "Product Details" page and check the "Disable Remove" option. This way, the user will be able to select only the "Change" button from the "Programs and Features" list and the MSI will enter into Maintenance mode, so your dialogs will always be displayed during the uninstall.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lesliehedzg
Posts: 13
Joined: Tue Jul 24, 2018 10:05 pm

Re: Combobox: Text vs. values

I really appreciate your help, I am very new in this and I still have a lot of work to do, now I have a dialog for upgrade and downgrade, where do I put it?
thank you
Les
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Combobox: Text vs. values

Hello Les,

You can go in the "Dialogs" page and add your dialog in the "First Time Install" section under the "WelcomeDlg" dialog. In order to only display it during an upgrade, you can right-click on it, use the "Show only if..." option and use the "OLDPRODUCTS" condition for it. Downgrading a Windows Installer package is not possible.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lesliehedzg
Posts: 13
Joined: Tue Jul 24, 2018 10:05 pm

Re: Combobox: Text vs. values

Hi, "Show only if..." option is unable.
I can't select it.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Combobox: Text vs. values

Hello,

I'm not sure why that option is disabled for you. Please send me your project or a screenshot to support at advancedinstaller dot com, so I can see the configuration of your dialogs.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”