Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Trainee
Date of registration: Nov 24th 2008
Location: Cologne, Germany
Occupation: Second Vice President of Distributed Junk and Trash Development
For me, "ListData" return the same error than ItemData.
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
Public Sub List1_Click() MsgBox List1.ListData(List1.ListIndex) End Sub Public Sub Form_Load() Dim Counter As Integer For Counter = 0 To 100 List1.AddItem "Item" + Cstr(Counter) List1.ListData(List1.ListCount-1) = "ItemData" + Cstr(Counter) Next End Sub |
Trainee
Date of registration: Nov 24th 2008
Location: Cologne, Germany
Occupation: Second Vice President of Distributed Junk and Trash Development
ListData works with a ListBox, but don't work with ComboBox...
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
Type tComboboxItems Item As String Data As String End Type Dim ComboboxItems() As tComboboxItems Public Sub Form_Load() Dim Counter As Integer ReDim ComboboxItems(100) For Counter = 0 To 100 ComboboxItems(Counter).Item = "Item" + Cstr(Counter) ComboboxItems(Counter).Data = "Data" + Cstr(Counter) ComboBox1.AddItem ComboboxItems(Counter).Item Next End Sub Public Sub ComboBox1_Change() MsgBox(ComboboxItems(ComboBox1.ListIndex).Data) End Sub |