- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to remove the combobox items during runtime
- 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
How to remove the combobox items during runtime
Hi,
I was experiencing issues while removing the combobox item during run time . I was able to select the combobox item and able to perform actions but upon clicking the next pages i was not able to remove the combobox item during the runtime . The below is the code where i was able to add the combobox item to the combobox property
Could someone please help me on removing the combobox item during the runtime ?
function PopulateComboBox(hInstall)
NUMBER nResult, index,nvSize;
HWND hDatabase,hCboView,hViewlist;
STRING sQuery,txtname1,txtname11,txtname111;
begin
hDatabase = MsiGetActiveDatabase(hInstall);
sQuery = "SELECT * FROM ComboBox WHERE Property='COMBOBOXONEVAL'";
//MessageBox("squery "+sQuery,INFORMATION);
nResult = MsiDatabaseOpenView(hDatabase, sQuery, hCboView);
MsiViewExecute(hCboView, NULL);
if (nResult = ERROR_SUCCESS) then
MsiGetProperty (hInstall, "NAME1", txtname1, nvSize);
MsiGetProperty (hInstall, "NAME11", txtname11, nvSize);
MsiGetProperty (hInstall, "NAME111", txtname111, nvSize);
AddCboEntry(hCboView, "COMBOBOXPERSONDETAILS", txtname1, txtname1, 1);
AddCboEntry(hCboView, "COMBOBOXPERSONDETAILS", txtname11, txtname11, 2);
AddCboEntry(hCboView, "COMBOBOXPERSONDETAILS", txtname111, txtname111, 3);
endif;
MsiViewClose(hCboView);
end;
function AddCboEntry(hView, szProperty, szText, szValue, nIndex)
NUMBER hRec;
NUMBER res;
begin
hRec = MsiCreateRecord(4);
res = MsiRecordSetString(hRec, 1, szProperty);
res = MsiRecordSetInteger(hRec, 2, nIndex);
res = MsiRecordSetString(hRec, 3, szText);
res = MsiRecordSetString(hRec, 4, szValue);
res = MsiViewModify(hView, MSIMODIFY_INSERT_TEMPORARY, hRec);
MsiCloseHandle(hRec);
end;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
