iOS Question Tableview click selected

Samplatiner

Member
Licensed User
Longtime User
Good morning b4x-communicty,


I have a question to the tableview.

I want to detect clicks and longclicks, but they do not have Parameters, which row is clicked.

this thread
https://www.b4x.com/android/forum/threads/tableview-click-longclick-and-clicked-cell.52981/

says, i sould use selectedchange, but this Event does not fire as Long as I have a click/longclick-detection active.

So how to get which line his been clicked?

I would be happy about a good hint :)


Best regards,

Daniel
 

Samplatiner

Member
Licensed User
Longtime User
I have to correct this a bit.

Only the Click-Event (even if empty) blocks the selectedchange-Event

if I comment the click-Event, the selectedchange-Event fires
 
Upvote 0

Samplatiner

Member
Licensed User
Longtime User
I used the click Events and I yes, they block the selectedchange-Event

but that's the Problem. without the selectedChange-Event I do not know, on which row the user has klicked, so I can't start the interaction with the click row.

How do I get the Information, on which row the user has clicked? the click Event does not have any Parameters

Edit:
A Screenshot:
http://www.pic-upload.de/view-27979550/pic.png.html
 
Upvote 0

Samplatiner

Member
Licensed User
Longtime User
great, that's perfect.

thanks a lot, that works great.

while creating the rows now I have added the index as a tag to the Panels.

Every Panel has the same eventname, so it's that easy:

B4X:
Sub pnlTableTablet_Click
  Dim pnl As Panel=Sender
  Dim index as int=pnl.Tag
End Sub
 
Upvote 0
Top