M Mike1970 Well-Known Member Licensed User Longtime User Dec 15, 2020 #1 Hi everyone, how can i disable the "click" on the various items in my customlistview? in B4i it's done like so: B4X: Dim p As Panel = clv.AsView p.UserInteractionEnabled = False But in B4A i didn't find anything like this. Even if I remove the check from "Enabled" in the designer, the items are still clickable Thanks in advance
Hi everyone, how can i disable the "click" on the various items in my customlistview? in B4i it's done like so: B4X: Dim p As Panel = clv.AsView p.UserInteractionEnabled = False But in B4A i didn't find anything like this. Even if I remove the check from "Enabled" in the designer, the items are still clickable Thanks in advance
LucaMs Expert Licensed User Longtime User Dec 15, 2020 #2 I think this does not exist. You can overlay a transparent panel on the CustomListView and create the empty CustomListView1_Touch event routine, then set it visible / invisible when needed. Last edited: Dec 15, 2020 Upvote 0
I think this does not exist. You can overlay a transparent panel on the CustomListView and create the empty CustomListView1_Touch event routine, then set it visible / invisible when needed.
LucaMs Expert Licensed User Longtime User Dec 15, 2020 #3 Like this. EDIT: moved a comment line to the right place Attachments LockCLV.zip LockCLV.zip 14.3 KB · Views: 580 Last edited: Dec 15, 2020 Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Dec 15, 2020 #4 1. Make the "pressed color" transparent in the designer. 2. Remove the click sound: https://www.b4x.com/android/forum/threads/b4x-customlistview-disable-click-event.123461/post-771505 Upvote 0
1. Make the "pressed color" transparent in the designer. 2. Remove the click sound: https://www.b4x.com/android/forum/threads/b4x-customlistview-disable-click-event.123461/post-771505
LucaMs Expert Licensed User Longtime User Dec 15, 2020 #5 Erel said: 1. Make the "pressed color" transparent in the designer. 2. Remove the click sound: https://www.b4x.com/android/forum/threads/b4x-customlistview-disable-click-event.123461/post-771505 Click to expand... ? Upvote 0
Erel said: 1. Make the "pressed color" transparent in the designer. 2. Remove the click sound: https://www.b4x.com/android/forum/threads/b4x-customlistview-disable-click-event.123461/post-771505 Click to expand... ?
M Mike1970 Well-Known Member Licensed User Longtime User Dec 15, 2020 #6 Erel said: 1. Make the "pressed color" transparent in the designer. 2. Remove the click sound: https://www.b4x.com/android/forum/threads/b4x-customlistview-disable-click-event.123461/post-771505 Click to expand... this will disable the user interaction D: ?? Edit: No ? Last edited: Dec 15, 2020 Upvote 0
Erel said: 1. Make the "pressed color" transparent in the designer. 2. Remove the click sound: https://www.b4x.com/android/forum/threads/b4x-customlistview-disable-click-event.123461/post-771505 Click to expand... this will disable the user interaction D: ?? Edit: No ?
M Mike1970 Well-Known Member Licensed User Longtime User Dec 15, 2020 #7 I solved like so: B4X: Sub clvMode_ItemClick (Index As Int, Value As Object) If Not(ClvModeClicked) Then ClvModeClicked = True '... Do Stuff with sleep etc...' ClvModeClicked = False End If End Sub So if i tap more times quickly the items in the clv, until the code in the function is running, those are ignored thanks to the "clvModeClicked" variabile P.S. the variabile is initiliazed to False in the Globals Upvote 0
I solved like so: B4X: Sub clvMode_ItemClick (Index As Int, Value As Object) If Not(ClvModeClicked) Then ClvModeClicked = True '... Do Stuff with sleep etc...' ClvModeClicked = False End If End Sub So if i tap more times quickly the items in the clv, until the code in the function is running, those are ignored thanks to the "clvModeClicked" variabile P.S. the variabile is initiliazed to False in the Globals
Erel B4X founder Staff member Licensed User Longtime User Dec 16, 2020 #8 The question in the first post wasn't clear. You haven't told what exactly you want to disable. Upvote 0
M Mike1970 Well-Known Member Licensed User Longtime User Dec 16, 2020 #9 Erel said: The question in the first post wasn't clear. You haven't told what exactly you want to disable. Click to expand... actually thought yes Mike1970 said: how can i disable the "click" Click to expand... Mike1970 said: Even if I remove the check from "Enabled" in the designer, the items are still clickable Click to expand... but no problems , thanks anyway to all☺☺ Upvote 0
Erel said: The question in the first post wasn't clear. You haven't told what exactly you want to disable. Click to expand... actually thought yes Mike1970 said: how can i disable the "click" Click to expand... Mike1970 said: Even if I remove the check from "Enabled" in the designer, the items are still clickable Click to expand... but no problems , thanks anyway to all☺☺