iOS Question Adding B4XComboBox to CustomListView

Zhien

Member
Licensed User
I have a CustomListView that each contains a combobox inside each item in the list.

I need to get the index for each selections in the comboBox that's currently within a CustomListView

Private Sub cbCheck_SelectedIndexChanged (Index As Int)

Dim idx As Int = clvCheckList.GetItemFromView(Sender)

If checkList.IsInitialized Then
Dim item As CheckListDetail = checkList.Get(idx)

item.status = Index

End If
End Sub

But I get an error back saying Expected: UIView, object type: b4i_b4xcombobox, obj_exception throw

This works with Switch components, but not a ComboBox component.

Any ideas how to work around this?
 

walterf25

Expert
Licensed User
Longtime User
I have a CustomListView that each contains a combobox inside each item in the list.

I need to get the index for each selections in the comboBox that's currently within a CustomListView



But I get an error back saying Expected: UIView, object type: b4i_b4xcombobox, obj_exception throw

This works with Switch components, but not a ComboBox component.

Any ideas how to work around this?
Where are you defining the Sender Object, you need to pass the B4xComboBox object to the sender.
 
Upvote 0

Zhien

Member
Licensed User
The Sender object is a keyword in B4X. I did not need to define it.
 
Upvote 0
Top