Then relativerow would be 0
Cetin
>Cetin --
>
>My apologies for not making my question clear.
>
>As part of the discussion in this thread, I had asked whether it was possible to know which record was displayed in the top row of the grid.
>
>You had responded by suggesting the use or recno() and relativerow.
>
>My new question here is: how does this work when the user has scrolled so that the active row is no longer visible? I do not see how any combination of recno(), activerow(), or relativerow() can help.
>
>Thanks again,
>
>Jim
>
>
>>James,
>>Sorry I didn't understand the question. Calculating visible rows count doesn't have anything to do with where the record pointer is. Grid might even be unbound. You have rowheight, headerheight, height, sysmetric() to calculate it.
>>Cetin
>>
>>>Cetin --
>>>
>>>A question about a message of yours from half a year ago.
>>>
>>>I asked about the use of DynamicFontShadow to determine which is the top record displayed. You suggested calculating it ...
>>>
>>>However, I don't think that works when the user has scrolled so that the active record is off the screen, does it? In my particular case, the user has scrolled down along way (the active record is way off the top of the screen). So, recno() doesn't point to a record on the screen ... and using ActivateCell, as I had been doing, jumps the grid back to the current record in the grid.
>>>
>>>Any suggestion?
>>>