Hi,
My combobox items are actually objects (a class I wrote).
This is the class:
Sub Class_Globals
Private Code As Int
Private Description As String
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize(aCode As Int, aDesc As String)
setCode(aCode)
setDescription(aDesc)
End Sub
public Sub setCode(aCode As Int)
Code = aCode
End Sub
public Sub getCode() As Int
Return Code
End Sub
public Sub setDescription(aDesc As String)
Description = aDesc
End Sub
public Sub getDescription() As String
Return Description
End Sub
In the main module I initialize the combobox and I add items.
Dim c as MyClass
c.initialize(1,"One")
combo.items.add(c)
How do I tell the combobox to display the string (Description)?
Thanks.
My combobox items are actually objects (a class I wrote).
This is the class:
Sub Class_Globals
Private Code As Int
Private Description As String
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize(aCode As Int, aDesc As String)
setCode(aCode)
setDescription(aDesc)
End Sub
public Sub setCode(aCode As Int)
Code = aCode
End Sub
public Sub getCode() As Int
Return Code
End Sub
public Sub setDescription(aDesc As String)
Description = aDesc
End Sub
public Sub getDescription() As String
Return Description
End Sub
In the main module I initialize the combobox and I add items.
Dim c as MyClass
c.initialize(1,"One")
combo.items.add(c)
How do I tell the combobox to display the string (Description)?
Thanks.