B4J Question Generating Mouse Events from CLV Item


Active Member
Licensed User
Longtime User
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.


B4X founder
Staff member
Licensed User
Longtime User
1. Add the item with AddTextItem.
2. Get the last added panel and add a transparent panel above it:
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