Carlos Muniz Member Licensed User Longtime User May 15, 2020 #1 Hello: I have a Custon List Viewer with an Image Viewer and several Labels, everyone over a Panel. My CLV has about 40 panels like that. Now I need to click over some Image Viewer and catch the contents of every Label inside the same Panel. I couldn't find any information about this important operation. How can I get it ?
Hello: I have a Custon List Viewer with an Image Viewer and several Labels, everyone over a Panel. My CLV has about 40 panels like that. Now I need to click over some Image Viewer and catch the contents of every Label inside the same Panel. I couldn't find any information about this important operation. How can I get it ?
mangojack Expert Licensed User Longtime User May 16, 2020 #2 Carlos Muniz said: I have a Custon List Viewer with an Image Viewer and several Labels, Click to expand... First .. in future be sure to post a question in Android Questions Forum. (if you can , edit Title to xCustomListView Get Views) If you study the xCustomListView example , It would show how to do this. https://www.b4x.com/android/forum/attachments/xcustomlistview-example-zip.87867/ I presume you have at least followed the example code ... (you have a reference to XUI lib and views declared as B4XView) 1. If your views are directly added to items Layout ... Code: Sub ImageView1_Click Dim index As Int = clv1.GetItemFromView(Sender) Dim pnl As B4XView = clv1.GetPanel(index) pnl.GetView(1).Text = "ABC" 'view(1) = 2nd view on panel pnl.GetView(2).Text = "123" 'view(2) = 3rd view End Sub 2. if your views are added to a Panel in items Layout ... Code: Sub ImageView1_Click Dim index As Int = clv1.GetItemFromView(Sender) Dim pnl As B4XView = clv1.GetPanel(index) Dim pnl2 As B4XView = pnl.GetView(0) pnl2.GetView(1).Text = "ABC" '2nd view '.......................................... Refer to Designer > View Tree to determine the Views(index) Last edited: May 16, 2020 Upvote 0
Carlos Muniz said: I have a Custon List Viewer with an Image Viewer and several Labels, Click to expand... First .. in future be sure to post a question in Android Questions Forum. (if you can , edit Title to xCustomListView Get Views) If you study the xCustomListView example , It would show how to do this. https://www.b4x.com/android/forum/attachments/xcustomlistview-example-zip.87867/ I presume you have at least followed the example code ... (you have a reference to XUI lib and views declared as B4XView) 1. If your views are directly added to items Layout ... Code: Sub ImageView1_Click Dim index As Int = clv1.GetItemFromView(Sender) Dim pnl As B4XView = clv1.GetPanel(index) pnl.GetView(1).Text = "ABC" 'view(1) = 2nd view on panel pnl.GetView(2).Text = "123" 'view(2) = 3rd view End Sub 2. if your views are added to a Panel in items Layout ... Code: Sub ImageView1_Click Dim index As Int = clv1.GetItemFromView(Sender) Dim pnl As B4XView = clv1.GetPanel(index) Dim pnl2 As B4XView = pnl.GetView(0) pnl2.GetView(1).Text = "ABC" '2nd view '.......................................... Refer to Designer > View Tree to determine the Views(index)
M Mahares Expert Licensed User Longtime User May 20, 2020 #4 Carlos Muniz said: Thanx a lot. Click to expand... Since @mangojack answered your question, do him a favor and change the title of your thread like he instructed you to do. The forum works both ways. Upvote 0
Carlos Muniz said: Thanx a lot. Click to expand... Since @mangojack answered your question, do him a favor and change the title of your thread like he instructed you to do. The forum works both ways.