Page 1 of 1

Remembering ListBox Selection

Posted: Tue Jan 31, 2017 1:12 pm
by hkeller
I am having an issue re-highlighting a user's ListBox choice (Dialog 1) if they go Back from Dialog 2. I have been able to make a default selection by setting the variable the ListBox is linked to, but if the user does not choose the default ListBox item and returns to that dialog no item is highlighted, even though in the code the variable (linked to the ListBox) contains the correct value. I am using InstallAware 12, is this possible?

Attached is an example of what I am seeing. (From the first dialog select "StringB" then go to the next dialog. Click Back and see that no item in the ListBox is highlighted).

Thanks,

Hannah

Re: Remembering ListBox Selection

Posted: Thu Feb 02, 2017 4:45 am
by FrancescoT
Dear Hannah,

please have a look at my edited copy of the project.

Because you are using an old IA version, I recommend the of use the control instead of the TListBox control.

Please note that I had to use IA X5 to edit you original project.
Probably you will be not able to open it correctly using IA 12, but you should be able to load the script file and the extra dialog I used for the TCheckListBox control.

Hope this helps you.

Regards

Re: Remembering ListBox Selection

Posted: Wed Feb 08, 2017 3:35 pm
by hkeller
Hi Francesco,

I know I am using an older version so I appreciate you still looking into it. I had looked into using a checkbox control instead, the one issue I have is the user should only be allowed to select one item and I did not see a way to do that with the checkbox control. I know I could probably accomplish what I want with radio buttons, but believe there would be a lot more overhead as I would have to do checks for the TRUE/FALSE values of the radio buttons to set another variable to the string value of the radio buttons. I will probably stick with what I have with the listbox until we upgrade to a newer version.

Thanks for the help,

Hannah

Re: Remembering ListBox Selection

Posted: Thu Feb 09, 2017 2:52 pm
by FrancescoT
Dear Hannah,

to allow the single-item selection, you may set to FALSE the "MultiSelect" property of the "TListBox".

Hope this helps you.

Regards