In delphi 7, you have a one column stringGrid with no fixed col, whose rowCount is 50 and populate it with 100 items. After playing around with navigation keys, how to find out, by code, which of those 100 items occupies the first position of the grid, at a given moment ?
Asked
Active
Viewed 473 times
0
-
3TopRow property – MBo Sep 09 '21 at 19:32
-
1Why does this sound like homework? – AmigoJack Sep 09 '21 at 19:35
-
1@AmigoJack: It doesn't imo. Overt "homework" is hardly ever to do with the behavioural aspects of TStringGrid/TDBGrid. – MartynA Sep 09 '21 at 20:57
-
@MartynA I as tutor would ask such a question to see which student is capable of just looking at the available properties and try those that may fit - it'd make sure the programmer either knows the IDE's auto completion or can browse the documentation. Or use reflections (RTTI). – AmigoJack Sep 09 '21 at 22:34
1 Answers
-1
I found the answer to my own question: topRow

user3450717
- 17
- 2
-
With no further explanation this answer is less worth than MBo's comment to the question, answering the very same and earlier. It helps no future reader to see *how* this was found out. – AmigoJack Sep 10 '21 at 18:38