TStringGrid - is there a simple way to get the "current/selected" row?
46,233
Solution 1
.Row for selected row, .Col for selected column
Solution 2
Please have a look at TStringGrid.Row
.
Author by
Mawg says reinstate Monica
Donate a cup of food for free: Click to Give @ The Hunger Site SOreadytohelp
Updated on October 31, 2020Comments
-
Mawg says reinstate Monica over 3 years
I can go the long way round, loop over each row, get a
TRect
fromCellRect(col, row)
, then query itsState
forgdSelected
...But isn't there a quicker way to get the row number of the currently selected row, if any?
-
Mawg says reinstate Monica over 14 yearsD'oh! How on earth did I miss that??? Thanks, both. Andre answered first, so I award him the answer and up you both. If only all questions were this easy, eh?