A aLya121314 Member Jan 12, 2021 #1 Hello everyone. I hope someone could help me today. I look for codes that could disable a button in custom list view that is in a panel when pressed but then I cant find answers. I also tried many codes to solve this but there is no progress. Here's the code that i tried. Though only the last panel was only disabled. B4X: Copy Sub ButtonConfirm_Click Dim Index As Int = Clv1.GetItemFromView(Sender) ButtonConfirm.Enabled = False End Sub Can someone help me with this? Thank you all.
Hello everyone. I hope someone could help me today. I look for codes that could disable a button in custom list view that is in a panel when pressed but then I cant find answers. I also tried many codes to solve this but there is no progress. Here's the code that i tried. Though only the last panel was only disabled. B4X: Copy Sub ButtonConfirm_Click Dim Index As Int = Clv1.GetItemFromView(Sender) ButtonConfirm.Enabled = False End Sub Can someone help me with this? Thank you all.
Erel B4X founder Staff member Licensed User Longtime User Jan 12, 2021 #2 Two options: 1. Code: Copy Dim btn As B4XView = Sender btn.Enabled = False 2. Code: Copy Dim Index As Int = Clv1.GetItemFromView(Sender) Dim p As B4XView = Clv1.GetPanel(Index) p.GetView(17).Enabled = False 'assuming that the index of ButtonConfirm in the item layout is 17. Upvote 0
Two options: 1. Code: Copy Dim btn As B4XView = Sender btn.Enabled = False 2. Code: Copy Dim Index As Int = Clv1.GetItemFromView(Sender) Dim p As B4XView = Clv1.GetPanel(Index) p.GetView(17).Enabled = False 'assuming that the index of ButtonConfirm in the item layout is 17.