csDropDownList and ItemIndex in comboboxes not working?

Got a problem you cannot solve? Try here.
adi
Posts: 57
Joined: Mon Mar 22, 2010 8:28 am

csDropDownList and ItemIndex in comboboxes not working?

Postby adi » Mon Mar 22, 2010 8:43 am

Hi,

I'm having problems selecting the default item in the combobox control with csDropDown style.

I want the user to choose one of the predefined values from the combobox, so:
1. I create a combobox
2. I provide the values: One, Two, Three
3. I set the ItemIndex to 0.

Until now everything works fine. The default item (One) is selected automatically. The combobox however allows the user to input some other value, not on the list.

4. I'm setting the style to csDropDownList and... setting the ItemIndex to 0 doesn't work anymore. After the dialog shows up, no item is selected.

Did I find a bug? Or am I doing something wrong here?

Best regards,
adi

adi
Posts: 57
Joined: Mon Mar 22, 2010 8:28 am

Re: csDropDownList and ItemIndex in comboboxes not working?

Postby adi » Wed Apr 21, 2010 3:06 am

Hello,

Could someone from the IA team confirm that it's now working? or acting like that by design?
I think I've found a bug.

Best regards,
adi

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: csDropDownList and ItemIndex in comboboxes not working?

Postby MichaelNesmith » Wed Apr 21, 2010 4:15 am

This is a misunderstanding on your part, regarding how to use the control:

Bind it to a variable,
Assign a default value to that variable,
And the engine will pre-select the list-box item corresponding to that variable's value.

You can also populate the listbox using variables :)
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

adi
Posts: 57
Joined: Mon Mar 22, 2010 8:28 am

Re: csDropDownList and ItemIndex in comboboxes not working?

Postby adi » Wed Apr 21, 2010 9:02 am

Hi,

Many thanks.
Indeed my understanding of this control was different. I thought that the ItemIndex will take precedence over the variable.
You saved my day.

Best regards,
adi

adi
Posts: 57
Joined: Mon Mar 22, 2010 8:28 am

Re: csDropDownList and ItemIndex in comboboxes not working?

Postby adi » Wed Apr 21, 2010 9:15 am

Hello,

One more thing - I was misled because of the way that "Object behavior" for comboboxes is displayed.
The "Receives information" field is disabled and the "Write values to" is enabled, which suggests one-way binding only, from control to variable. In such case the ItemIndex would be used to provide the initial value.

In other controls in the first combobox you can choose the "Written variable value" which suggests two-way binding.

Best regards,
adi

Dany
Posts: 13
Joined: Mon Feb 22, 2016 6:58 am

Re: csDropDownList and ItemIndex in comboboxes not working?

Postby Dany » Sat Feb 27, 2016 6:19 am

I was also confused by this. IMHO it is extremely unintiutive and there's no details to be found.
Another thing to fix is to have th object inspector display the control class name (or type). Inferring it from visual and the properties list is not always so easy.

Regards,

/Dany

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: csDropDownList and ItemIndex in comboboxes not working?

Postby FrancescoT » Mon Feb 29, 2016 2:23 pm

Dear Dany,

we will take in account your note.

Thanks!
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 155 guests