iOS Question can't get the index from a customlistview

omarruben

Active Member
Licensed User
Longtime User
B4X:
Dim index As Int = CustomListView1.GetItemFromView(Sender) <--- error
map1 = list1.Get(index)

the sender is a swiftButton customview

the error:

Expected: UIView, object type: b4i_swiftbutton

I undestand that swfitbutton is not a regular UIView? how I can get the index???, thank you
 

mangojack

Expert
Licensed User
Longtime User
try this ..
B4X:
dim sb as SwiftButton = Sender
Dim index As Int = CustomListView1.GetItemFromView(sb.mBase)

*Edit ... Just realized B4i related (unsure if above will work)


see this thread for other options / methods ...
 
Last edited:
Upvote 1
Cookies are required to use this site. You must accept them to continue using the site. Learn more…