Collected but not used by me, this VBScript used in a custom action may
help:

 

Function Combo()

 

' This function initializes and then sets variables to set values for
the four columns

' of the ComboBox table (Property, Order, Value and Text).  Then a
function is called to add

' the row of values to the table.

 

'  Initialize variables used for each column of the ComboBox table

            Dim ComboProp

            Dim ComboOrder

            Dim ComboValue

            Dim ComboText

 

'  Set properties for each of the four columns

            ComboProp = "COMBO"

            ComboOrder = 1

            ComboValue = "Dog"

            ComboText = "Dog"

 

'  Call function to add this row of values to the ComboBox table

            addToComboBox ComboProp, ComboOrder, ComboValue, ComboText

 

'Repeat Process as needed

 

            ComboProp = "COMBO"

            ComboOrder = 2

            ComboValue = "Cat"

            ComboText = "Cat"

            addToComboBox ComboProp, ComboOrder, ComboValue, ComboText

 

            ComboProp = "COMBO"

            ComboOrder = 3

            ComboValue = "Frog"

            ComboText = "Frog"

            addToComboBox ComboProp, ComboOrder, ComboValue, ComboText

 

            ComboProp = "COMBO"

            ComboOrder = 4

            ComboValue = "Bird"

            ComboText = "Bird"

            addToComboBox ComboProp, ComboOrder, ComboValue, ComboText

 

End Function

 

 

 

Function addToComboBox(ByVal ComboProp, ByVal ComboOrder, ByVal
ComboValue, ByVal ComboText)

 

' This function takes values passed into it from the function call and
uses these values to create

' and execute a view within the current session of the Windows Installer
object.  This view is based

' on a SQL query constructed using the values passed into the function.
If you wish to get a deeper

' understanding of how this function works you should read up on the
Windows Installer object

' model in the Windows Installer SDK.

 

' Initialize variables

            Dim query

            Dim view

 

' Construct query based on values passed into the function.

' NOTE:  The ` character used is not a single quote, but rather a back
quote.  This character is typically

' found on the key used for the ~ symbol in the upper left of the
keyboard.

 

            query = "INSERT INTO `ComboBox` (`Property`, `Order`,
`Value`, `Text`) VALUES ('" & ComboProp & "', " & ComboOrder & ", '" &
ComboValue & "', '" & ComboText & "') TEMPORARY"

 

 

' This statement creates the view object based on our query

            Set view = Session.Database.OpenView(query)

 

' This statement executes the view, which actually adds the row into the
ComboBox table.

            view.Execute

 

End Function

=========================================================

 

Phil Wilson 

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, October 02, 2007 1:24 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] dynamically fill a combobox

 

Hi,

I want to use a custom action to fill dynamically a combobox. But I do
not know how the output of the custom action should look like. I only
think to know that I have to bind a property to the ouput to get the
selected item of the combobox.

 

Regards, Peter

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to