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
- :
- Need to Populate ComboBox data
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
‎Aug 17, 2008
02:39 AM
Need to Populate ComboBox data
Hi,
I am working in Basic MSI project. I am trying to populate a combo box from a List of string. I read that CtrlGetText() will not work with basic msi. Then can anyone please help me that how i can populate a combo box runtime from a list of string.
Zaq
I am working in Basic MSI project. I am trying to populate a combo box from a List of string. I read that CtrlGetText() will not work with basic msi. Then can anyone please help me that how i can populate a combo box runtime from a list of string.
Zaq
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 18, 2008
05:33 AM
Hi,
I find a lot and finally make a solution which is correct or not i dont know.
You need to create a custom action and need to map this function to this custom action.
Remember to put your combo box Property name in to this line, Instead of TESTPROP.
I hope this will save some of your time.
/Zaq
I find a lot and finally make a solution which is correct or not i dont know.
You need to create a custom action and need to map this function to this custom action.
export prototype PopulateListCombo(HWND);
//PopulateCombo
function PopulateListCombo(hMSI)
LIST StringList;
STRING svString, sPath;
NUMBER nResult, nPath;
NUMBER hDatabase, hCBOView, hView, hRec;
STRING szText;
number index, nCount;
STRING sQuery;
begin
index=0;
hDatabase=MsiGetActiveDatabase(hMSI);
sQuery="SELECT * FROM ComboBox WHERE Property='PROPNAME'";
nResult = MsiDatabaseOpenView(hDatabase,sQuery,hCBOView);
hRec=MsiCreateRecord(4);
StringList = ListCreate (STRINGLIST);
ListAddString(StringList,"ZAQ",AFTER);
ListAddString(StringList,"FAK",AFTER);
ListAddString(StringList,"MAM",AFTER);
nResult = ListGetFirstString (StringList, svString);
MsiRecordSetString(hRec,1,'TESTPROP');
MsiRecordSetInteger(hRec,2,index);
MsiRecordSetString(hRec,3,svString);
MsiRecordSetString(hRec,4,svString);
MsiViewModify(hCBOView,MSIMODIFY_INSERT_TEMPORARY,hRec);
nResult = ListGetNextString (StringList, svString);
while (nResult != END_OF_LIST)
index=index+1;
MsiRecordSetString(hRec,1,'TESTPROP');
MsiRecordSetInteger(hRec,2,index);
MsiRecordSetString(hRec,3,svString);
MsiRecordSetString(hRec,4,svString);
MsiViewModify(hCBOView,MSIMODIFY_INSERT_TEMPORARY,hRec);
nResult = ListGetNextString (StringList, svString);
endwhile;
MsiCloseHandle(hRec);
MsiViewClose (hView);
end;
Remember to put your combo box Property name in to this line, Instead of TESTPROP.
MsiRecordSetString(hRec,1,'TESTPROP');;
I hope this will save some of your time.
/Zaq
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 30, 2023
11:14 PM
I have got a case where i need to remove my combobox item during runtime. Is there a way where i can do it? I have been struggling to get this work from many days
Use case:
I have got a combobox and i have selected one item from it to do some customaction. In the next dialog i want the combobox item to get removed because i have already used it. So the remaining items needs to show apart from the one i have selected in the previous dialog.
Is there any piece of code which can make this work ?
Any help is highly appreciated .
