I am trying to determine what column is selected in the mousedown event of a listbox header. The code below works as long as the header is not clicked. If the header is clicked, the column returned is always -1. How can I determine the column when the header is clicked?
Check out the header press event. It returns the selected column.
Sorry, meant to write HeaderPressed. XXXXX autocorrect !!1!
Fantastic! This works. I still wish the
Me.ColumnFromXY(System.MouseX - Me.Left - Self.Left, System.MouseY - Me.Top - Self.Top)
code worked so I wouldn’t have to put code in two events.
Dim columnIndex As Integer = ColumnFromXY(x, y + HeaderHeight)
how do i know if the column i pressed in ascending or descending??? is there any value i can check??