I would like to display a window always below clicked row of column 5 aligning it with left side of column 5, which is the X value of clicked column 5.
clicking column 5 works fine!
If I click column 1 … 4, is there a way to get the X value of column 5, so I can align the window below column 5 ?
It is hard to tell from your question exactly what you want to know, but the above is ideal for taking the X,Y coordinates of a mouse click and determining what column it represents. I’ve not yet had the need to otherwise determine where a column boundary is located, but depending on your need it seems like it should be able tl computed by using the above in an algorithm.
I wanted to know the exact X pointed in my red arrows, where some starting column X was. I missed how to find the displacement and then I’ve found DesktopListBox.ScrollPositionX
positionX = system.MouseX - x + calculateColumnXposition
calculateColumnXposition:
loop from clicked column to wanted column(5)
and use listbox.ColumnAt ( li_column ).widthActual to add up the column widths.
the total column widths can be positive or negative depending on if clicked column is before or after your wanted column(5).