Android Question Getting the Control Name

Brad Henderson

Member
Licensed User
I am new to B4A but am loving it so far. I'm stuck on trying to find which scrollview has issued the cell_click event.
I have 5 scrollviews(with 3 columns) and when any item in any of the scrollviews is clicked I assign a label to the sender. While label.text gives me the contents of that cell I can't find a way to get the name of the scrollview that was clicked.
Any help is greatly appreciated
Brad
 

sorex

Expert
Licensed User
Longtime User
you should enter a value in the tag element of the scrollview.

then in your label click event you could try something like

B4X:
Dim l As Label=Sender
log(l.Parent.Tag)

as it is a scrollview you might need to add the tag value to the inner panel.
you'll need to test that so it might be this if added to the scrollview itself

B4X:
l.Parent.Parent.Tag
 
Last edited:
Upvote 0

Brad Henderson

Member
Licensed User
Thanks Erel I will have another look at xCustomListView. As an aside I am trying to adapt the TableExample that places a table in a panel within the scrollview.

Almost at where I want it, but just can't find a way to determine from which table/panel/scrollview the cell_click event was initiated.
 
Upvote 0

Brad Henderson

Member
Licensed User
Erel,
What I am trying to achieve is to display a week of appointments for customers showing 5 separate "views" for each day. Each day will need to be scrollable to fit onto the tablet with landscape view. When these 5 days of appointments are displayed I want to click/tap on one particular entry/customer and start a new activity displaying that customers details. This data is coming from a sqlite database.
Do you think the xCustomlistView is the appropriate resource for this?

Thanks again
Brad
 
Upvote 0
Top