TStringGrid - is there a simple way to get the "current/selected" row?

Mawg says reinstate Monica picture Mawg says reinstate Monica · Jan 21, 2010 · Viewed 43k times · Source

I can go the long way round, loop over each row, get a TRect from CellRect(col, row), then query its State for gdSelected ...

But isn't there a quicker way to get the row number of the currently selected row, if any?

Answer

André picture André · Jan 21, 2010

.Row for selected row, .Col for selected column