Populating List Boxes at Run Time

InstallShield 2024\

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 Populating A List Box Dynamically At Run Time in the Revenera Community. For additional information, see Accessing the MSI Database at Run Time in the Revenera Community.

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