Adding an Element After the Current Element
InstallShield 2020
If the current string is the first string in the list, and you add the new string after the current string, the new string becomes the second string in the list, as well as the new current string. Refer to the script fragment below and to the illustration following it:
// Create the empty list of strings.
listID = ListCreate (STRINGLIST);
// Test for a valid list
if (listID = LIST_NULL) then
MessageBox ("List not created", SEVERE);
else
// Add some strings to the list.
szString = "String 1";
ListAddString (listID, szString, AFTER);
szString = "String 2";
ListAddString (listID, szString, AFTER);
endif;
String 2 is added after String 1.