TableView1.Columns.Count = 3
TableView1.Columns[0].Title = "Variable Class"
TableView1.Columns[0].Width = TableView1.Font.TextWidth(TableView1.Columns[0].Title) + 10
TableView1.Columns[1].Text = "ID"
TableView1.Columns[1].Width = TableView1.Font.TextWidth(TableView1.Columns[1].Title) + 100
TableView1.Columns[2].Text = "DATA"
TableView1.Columns[2].Width = TableView1.Font.TextWidth(TableView1.Columns[2].Title) + 200
Now, I have clicked on a table cell. So the current row index is stored in TableView1.Row. I want to know, relative to the container, where the top of the current cell is. So all what I need to do is sum up the individual row heights upto but not including current cell / current row index, then add TableView1.Top. Now, if I do this :
sumVals = 0
For cnt = 0 To TableView1.Row - 1
sumVals = sumVals + TableView1.Rows[cnt].Height
Next
cellTop = TableView1.Top + sumVals + 2
This however is not including the height of the title row. In the For loop definition, the 0 jumps to the first row after the title row ( = second overall) and starts counting from there.I thought of using
TableView1.Current.Top
as well. But in the first data row after the title row ( = second overall) it returns a value of 0, again ignoring the title height.How can I address the problem, so that the height of the title row is counted? Thank you.