BrianRHobbs
Posts: 20
Joined: Tue Jun 24, 2008 11:13 am

problems populating a combo box

Hi There,

I've been hitting some problems populating a static combo box and have been unable to find solutions in the help or forum. So, here's my need - I want to display a static combo box (i.e. the user has to select one of the options, no typing) with two options. These are fixed options (i.e. not determined at runtime or from SQL etc.). I was hoping that there would be a way to simply define these values in the properties panel for the control, but unless I'm missing something....


so, I did a search & found the tutorial on working with lists & combos and this basically recommends using a custom action (PopulateComboBox). But when I tried this, I get the following error when I run the installer:

"A DLL required for this install to complete could not be run."

So, am I missing something?

Thanks in advance,
Brian
canhuth
Posts: 241
Joined: Thu Jun 19, 2008 9:03 am

Re: problems populating a combo box

Hi Brian,

if you provide a minimal AI project file maybe someone can take a quick look at what you tried exactly and see if something is wrong.



With best regards

Clemens Anhuth
BrianRHobbs
Posts: 20
Joined: Tue Jun 24, 2008 11:13 am

Re: problems populating a combo box

Hi.

I've attached a zipped up aip file that has a simple combobox & custom action - hope this helps.

Brian.
Attachments
combo.zip
(2.21 KiB) Downloaded 686 times
canhuth
Posts: 241
Joined: Thu Jun 19, 2008 9:03 am

Re: problems populating a combo box

Brian,

the tutorial page you mentioned says under "Introductory concepts":
In Advanced Installer, in order to add items to a ComboBox or ListBox control, select the "Control Data" context menu item or press the Ctrl + D keys while the focus is on the control.
I tried this and it worked with your project.



With best regards

Clemens Anhuth
BrianRHobbs
Posts: 20
Joined: Tue Jun 24, 2008 11:13 am

Re: problems populating a combo box

:oops: got so hung up on the properties panel I didn't even think of that!

Thankyou very much for that....
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Re: problems populating a combo box

Hi Brian,

Indeed, as Clemens has mentioned, if your data is static (it is known when authoring the project), it is not necessary to use the predefined Custom Actions provided by AI.

The error message you received when using the Custom Actions was due to the fact that you have changed the "Function Name" field to something invalid:

Code: Select all

PopulateComboBox [NEWDIALOGCOMBOBOX_1_PROP]|a|b|c
If dynamically populating Combobox or Listbox controls is required, the example projects provided might prove useful.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”