ComboBox "No Selection" Text - Advanced Installer Community
Enervast
Posts: 3
Joined: Wed Mar 04, 2020 6:37 pm

ComboBox "No Selection" Text

I'm currently building a simple installer that pulls info from a .json file in order to modify a different .json file.

I grab different configuration names from the first file, toss them into a Combo Box for user selection and take the result to modify the second file, this is fine and I've got it all working right now.

The ComboBox doesn't have anything initially selected after population, which is completely WAD - I don't want a user clicking right through the installation process without even looking at their configuration options, and have set the Next button to be disabled until a choice has been made.

What I want now is to have some default no-value display text in the ComboBox when a selection hasn't yet been made, " - Configuration -" or "- Nothing Selected -" or something similar. I'd thought the ComboBox\Display\Text property would do this but I'm not getting anything there.

I'm sure I'm just missing something here but is this supported? If so, how do I utilize it?
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: ComboBox "No Selection" Text

Hello and welcome to Advanced Installer forums,

In order to achieve that, you can use, on the dialog where your combobox resides, a "Set installer property" event that will set your combobox's property to a default value. For instance, if your combobox property is "COMBOBOX_1_PROP", then the event may look as it follows:

Event: Set installer property value
Property: COMBOBOX_1_PROP
Argument: Configuration
Condition: leave unchanged


You can add this event as an "Init Event" on the dialog that contains your combobox.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Enervast
Posts: 3
Joined: Wed Mar 04, 2020 6:37 pm

Re: ComboBox "No Selection" Text

This works with Combo List off, thank you.

Is there any way to get a similar display with Combo List True?

Incidentally, would you happen to know what the ComboBox\Display\Text property actually controls? It seems like it should've been this particular object, to me.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: ComboBox "No Selection" Text

Hello,
This works with Combo List off, thank you.
You are always welcome!
Is there any way to get a similar display with Combo List True?
I am afraid this is not possible. If the ComboList Control bit is set on a combo box, the edit field is replaced by a static text field. This prevents a user from entering a new value and requires the user to choose only one of the predefined values. For more information about this, please have a look on the following article:

ComboList Control Attribute
Incidentally, would you happen to know what the ComboBox\Display\Text property actually controls? It seems like it should've been this particular object, to me.
In what regards this, at a first glance, I believe that this should indeed achieve what you need. This might be an issue in what regards Advanced Installer. I will forward this to our development team for further investigations.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Enervast
Posts: 3
Joined: Wed Mar 04, 2020 6:37 pm

Re: ComboBox "No Selection" Text

Thank you for the swift help!
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: ComboBox "No Selection" Text

You are always welcome!

Glad I could help.

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

Return to “Common Problems”