Default Value for Combobox. is it possible? - 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!

marcelo
Posts: 103
Joined: Fri Sep 28, 2007 2:07 pm

Default Value for Combobox. is it possible?

Hi I have a combobox that I populated based on the example provided by Gigi on another thread. and it works properly.

Now I need to know, if it is possible to set a Default Value for that Combo box. I tried putting the name of on of the values on the Text property of the combobox but that didn't work.

Thanks,
Marcelo
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Here is how you can do this:
- in the "Dialogs" page you set the property of the combo box to COMBO (for example)
- in the custom action, after view.Close and before index = index + 1, you add this:

Code: Select all

if index=1 then
		Session.Property("COMBO")=strValue
	end if
- this will set the default value to first value that will appear in the combo box

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
marcelo
Posts: 103
Joined: Fri Sep 28, 2007 2:07 pm

It worked like a charm! Thanks Cosmin
thenefield
Posts: 68
Joined: Thu Dec 06, 2007 6:19 pm

Re: Default Value for Combobox. is it possible?

Hi,

I having a unique issue with my combobox implementation. I have used the examples provided for combobox. The combobox works fine on a system with Windows XP but not with Windows 2000. I have also ensured that the Windows 2000 system has all available updates from Microsoft. On the Win2K box, the combobox does not populate when executing the PopulateComboBox custom action. However the insertion of the AI_COMBOBOX_DATA returns with a success.

Also, I had built and executed the example combobox aip and it worked fine on the same Win2K box. It pulled all the environment variables into the combobox.

The only difference in my program is that I compile a list of directories in a certain location to select from, so I have changed my AI_COMBOBOX_DATA to MY_COMBOBOX|value1|value2|value3. I can see the values getting assigned to AI_COMBOBOX_DATA within my install log.

What am I missing?

Best regards,

Trey

UPDATE: I have discovered that I can use the arrow keys to navigate through the options, and they are all available. However, clicking on the combobox does not display the drop down menu.

UPDATE: I also discovered that copying the combobox included with the example and pasting into my installer actually fixed it. Although it still puzzles me as to why the combobox I added from the toolbar did not work.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Default Value for Combobox. is it possible?

Hi,

On older systems the combo box needs to be high enough to support all the entries you will add to it. Therefore, in your Advanced Installer project you can try following these steps:
- select the combo box on your custom dialog
- in the Properties pane set the Height attribute to 270
- rebuild the project

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”