Private Sub clv_ItemClick (Index As Int, Value As Object)
Dim itemgetoff As Int
Dim clvitem As CLVItem
'First I get the rawList Item
clvitem = clv.GetRawListItem(Index)
' then i set the popmenu left position
popupMenu.AsView.Left = clvitem.Panel.Width - 300dip
' then i check if the clv scroll content height is bigger than clv height then
' i set the itemgetoff variable to globaloffset
' that i have set based on scroll change event
If clv.sv.ScrollViewContentHeight > clv.AsView.Height Then
itemgetoff = globaloffset
Else
itemgetoff = 0
End If
' then i set the popupmenu top position to be showin over the clicked item
popupMenu.AsView.Top = clvitem.Offset + (clvitem.Panel.Height) - itemgetoff
End Sub