Populating List Boxes at Run Time
InstallShield 2023\
Project:This information applies to the following project types:
• | Basic MSI |
• | InstallScript MSI |
Basic MSI Projects
Populating a list box at run time requires you to create temporary records for the .msi database using SQL queries. For an example, see Knowledge Base article Q103295. For additional information, see InstallShield Developer Tip: Accessing the MSI Database at Run Time.
InstallScript MSI Projects
The CtrlSetList function associates a string list variable with a ListBox control on a dialog. For example:
function FillListBox( )
LIST listDays;
begin
listDays = ListCreate(STRINGLIST);
ListAddString(listDays, "Monday", AFTER);
ListAddString(listDays, "Wednesday", AFTER);
ListAddString(listDays, "Friday", AFTER);
CtrlSetList("DialogName", nListBoxId, listDays);
end;
See Also