G GuyBooth Active Member Licensed User Longtime User Jul 22, 2019 #1 I have a CustomListView which is filled using AddTextItem for each item. I can generate a clv_ItemClick (Index As Int, Value As Object) event, but I also need to be able to pick up MouseEvent data (right-click/long click, double-click etc). Is there a way to do this? I have tried to fire clv_MouseClicked(eventdata as MouseEvent) but no luck. Also tried to attach a MouseEvent filter but there I'm not sure if there is anything to attach it to.
I have a CustomListView which is filled using AddTextItem for each item. I can generate a clv_ItemClick (Index As Int, Value As Object) event, but I also need to be able to pick up MouseEvent data (right-click/long click, double-click etc). Is there a way to do this? I have tried to fire clv_MouseClicked(eventdata as MouseEvent) but no luck. Also tried to attach a MouseEvent filter but there I'm not sure if there is anything to attach it to.
Erel B4X founder Staff member Licensed User Longtime User Jul 23, 2019 #2 1. Add the item with AddTextItem. 2. Get the last added panel and add a transparent panel above it: Code: Copy Dim p As B4XView = clv.GetPanel(clv.Size - 1) Dim NewPanel As B4XView = xui.CreatePanel("pnl") NewPanel.SetColorAndBorder(xui.Color_Transparent, 0, xui.Color_Transparent, 0) p.AddView(NewPanel, 0, 0, p.Width, p.Height) Handle this panel events. Upvote 0
1. Add the item with AddTextItem. 2. Get the last added panel and add a transparent panel above it: Code: Copy Dim p As B4XView = clv.GetPanel(clv.Size - 1) Dim NewPanel As B4XView = xui.CreatePanel("pnl") NewPanel.SetColorAndBorder(xui.Color_Transparent, 0, xui.Color_Transparent, 0) p.AddView(NewPanel, 0, 0, p.Width, p.Height) Handle this panel events.