[Gambas-user] GridView and Current.Y

Benoît Minisini gambas at ...1...
Tue Feb 23 12:56:34 CET 2016


Le 23/02/2016 12:49, Rolf-Werner Eilert a écrit :
>> GridView.Current.Y - GridView.ScrollY + GridView.ClientY should do the
>> job. It returns the top cell relative to the GridView top.
>>
>
> Wow, that's tricky :) But it runs, so thank you very much!
>
> Regards
> Rolf
>

It's not tricky, it's based on the logic of the ScrollArea the GridView 
is now based on:

- Logical coordinates for the cell.
- The amount of scrolling.
- The client area that takes the border into account.

If your GridView has a top header, you have to take its size into 
account too, by using GridView.Columns.Height.

Regards,

-- 
Benoît Minisini




More information about the User mailing list