We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

MGS
Posts: 128
Joined: Tue Oct 04, 2022 9:52 am

Combobox pre-select entry

Hi,

I have a dialog with a combobox, which in turn has the property CB_PROP assigned. I fill that combobox and pre-select the first entry from a PowerShell script that I execute in the Init Events this dialog.

  • Filling the combobox works by assigning the AI_COMBOBOX_DATA to "CB_PROP|Value1#Text1|Value2#Text2" (and then afterwards calling the given PopulateComboBox custom action)
  • Assigning the first value of the combobox works by assigning the CB_PROP to "Value1".
Now, the "Value1" is correctly mapped to "Text1", thus "Text1" is displayed at the combobox IF the "Combo List"-property of the combobox is set to True. In my case, I need it to be set to False though and in this case if I set CB_PROP to "Value1", it is not mapped to "Text1" per default and instead "Value1" is displayed. If I now select the first entry manually though by clicking at it, "Text1" is displayed afterwards in the combobox.

Is there a way to make the combobox behave like I want, thus mapping the pre-selected "Value1" to "Text1" even if the "Combo List"-property is set to False?

Best regards,
Johannes
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Combobox pre-select entry

Hello Johannes,

Perhaps I do not quite understand your scenario here, because I've run a test just now and it looks like this is working as you'd expect with that attribute set to "false".

So the ComboBox has the following values assigned:
Screenshot_47.png
Screenshot_47.png (8.21 KiB) Viewed 5266 times

Upon running the setup, I can see that the values are mapped (if I sellect "test1", value "test123" will be displayed and if I select "test2", then value "test456" will be displayed)
Screenshot_48.png
Screenshot_48.png (62.31 KiB) Viewed 5266 times



Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”