Set combo-box from delimited string - Advanced Installer Community

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!

ctrollen
Posts: 3
Joined: Fri Jan 20, 2012 11:23 am

Set combo-box from delimited string

Apologies if this is a bit basic but I am very new to Advanced Installer!

I have created a custom action DLL which creates a comma-delimted string and puts it into a session variable. I would like to then parse this string and add each sub-string as an item to a combo-box on a custom dialog.

What is the easiest or best way of achieving this?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Set combo-box from delimited string

Hi and welcome to our forums,

Populating comboboxes/listboxes it not very simple, but if you have a little experience in writing custom actions it should be possible.
The following article presents a detailed set of steps that you need to follow in order to populate your combobox.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ctrollen
Posts: 3
Joined: Fri Jan 20, 2012 11:23 am

Re: Set combo-box from delimited string

Hi Bogdan,

Thanks - I had found the tutorial between my original post and your reply and I have now managed to get it working.
For completeness, I thought I'd share the solution for others here.

My custom action is a C# DLL so I set the AI_COMBOBOX_DATA value with my own data:

Code: Select all

  session["AI_COMBOBOX_DATA"] = "MYCOMBOBOX|Value 1|Value 2|Value 3";
I then added the Predefined UI Custom Action "PopulateComboxBox" under "UI Custom Actions" and called that using a DoAction event on the Combo-box control with the argument PopulateComboxBox and condition AI_COMBOBOX_DATA

Cheers,
Chris
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Set combo-box from delimited string

Thanks Chris, I am sure other users will find it useful too.

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”