This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Preselect dynamically filled item in combobox
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 17, 2009
10:35 AM
Preselect dynamically filled item in combobox
Hi
In my basic msi project i have a standard dialog with a combobox. I fill this combobox dynamically ( example on how to do it in thread: http://community.acresso.com/showthread.php?t=188501 ) and now i would like to preselect the combobox but i am a bit at loss on how to do it. CtrlSetCurSel does not work as it is not a custom dialog.
I prefer to have a solution in installScript or if not possible visual basic. (unfortunately, C# wont work for this) I am sure i need to set some property in the msi database, but which one and how do i access it properly
Thanks for your help in advance.
Greetings
In my basic msi project i have a standard dialog with a combobox. I fill this combobox dynamically ( example on how to do it in thread: http://community.acresso.com/showthread.php?t=188501 ) and now i would like to preselect the combobox but i am a bit at loss on how to do it. CtrlSetCurSel does not work as it is not a custom dialog.
I prefer to have a solution in installScript or if not possible visual basic. (unfortunately, C# wont work for this) I am sure i need to set some property in the msi database, but which one and how do i access it properly
Thanks for your help in advance.
Greetings
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 17, 2009
12:34 PM
Perhaps set the list box or combo box property (LISTBOXPROP or whatever) to the value (not the display name) you want to be selected.
In InstallScript, MsiSetProperty(hInstall, "LISTBOXPROP", "WhateverDefault"), in VBScript Property("LISTBOXPROP")="Default", etc.
As an aside, this old newsletter tip says a bit more about the subject (PDF warning): http://www.acresso.com/webdocuments/PDF/msiaccess.pdf.
In InstallScript, MsiSetProperty(hInstall, "LISTBOXPROP", "WhateverDefault"), in VBScript Property("LISTBOXPROP")="Default", etc.
As an aside, this old newsletter tip says a bit more about the subject (PDF warning): http://www.acresso.com/webdocuments/PDF/msiaccess.pdf.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 18, 2009
02:41 AM
Hi
Thanks for your answer. The solution is as you suggested. I just need to set the Property of the Combobox to a value that equals the value (not the display text) of one of the Combobox items. i should have come up with that myself (actually i did but a silly spelling mistake cause my try to fail)
Thanks for your help.
Greetings
Thanks for your answer. The solution is as you suggested. I just need to set the Property of the Combobox to a value that equals the value (not the display text) of one of the Combobox items. i should have come up with that myself (actually i did but a silly spelling mistake cause my try to fail)
Thanks for your help.
Greetings