Hi,
Note that when populating a listbox, the new values will not be shown if the button which adds the values is on the same dialog as the listbox.
Here are the steps to do what you need:
- in the "Install Parameters" page create the property
INDEX with the value
0
- create the "populate_listbox.vbs" file on the disk which contains this code:
Code: Select all
Set db = Session.Database
dim index
index=CInt(Session.Property("INDEX"))
Cmd = "INSERT INTO `ListBox` (`Property`,`Order`,`Value`,`Text`)"
Cmd = Cmd & " VALUES ('LISTBOX','" & index & "','" & Session.Property("ADD_LIST") & "','"
Cmd = Cmd & Session.Property("ADD_LIST") & "') TEMPORARY"
Set view = db.OpenView( Cmd )
view.Execute
view.Close
index=index+1
Session.Property("INDEX")=Cstr(index)
- add under "UI Custom Actions" the "populate_listbox.vbs" file as an Attached custom action in the "Custom Actions" page
- make sure that the "Function Name" field in the "Custom Action Properties" page is empty
- in the "Dialogs" page go to your custom dialog
- for the listbox set the "Property Name" field in the "Properties" section to
LISTBOX
- for the editbox set the "Property Name" field in the "Properties" section to
ADD_LIST
- select the button that will add the values and create this Published control event:
Code: Select all
DoAction populate_listbox.vbs AI_INSTALL
The user can now add the values one by one, but the values will be visible only if the listbox is on another dialog which comes after the one with the Add button.
You can read more about the Events Editor here:
http://www.advancedinstaller.com/user-g ... ditor.html
Regards,
Cosmin
FOLLOW US
Get the latest news in Application Packaging