Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is there any way to get the screen coordinates of the cell, in order to align nicely a context menu?

0
Posted

Is there any way to get the screen coordinates of the cell, in order to align nicely a context menu?

0

You can get the client coordinates of the cell using the following VB sample: Private Sub getCellPos(ByVal l As EXLISTLibCtl.List, ByVal nItem As Long, ByVal nColumn As Long, x As Long, y As Long) x = -l.ScrollPos(False) With l Dim c As EXLISTLibCtl.Column For Each c In .Columns If (c.Visible) Then If (c.Position = 0) y = y + .ItemHeight(i) i = .NextVisibleItem(i) Wend End With End With End Sub The getCellPos method gets the x, y client coordinates of the cell ( nItem, nColumn ). The nItem indicates the index of the item, and the nColumn indicates the index of the column.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123