[Gambas-user] GridView and Current.Y

Rolf-Werner Eilert eilert-sprachen at ...221...
Tue Feb 23 12:49:16 CET 2016


Am 23.02.2016 12:39, schrieb Benoît Minisini:
> Le 22/02/2016 17:43, Rolf-Werner Eilert a écrit :
>> Currently, I'm porting an old calendar project from Gambas2 to Gambas3.
>>
>> There is a GridView which shows days and times. It has 24 rows, so in
>> order to show a Baines Line, the code was
>>
>> GridView.Row = Hour(Now)
>>
>> baines.Y = GridView.Y + GridView.Current.Y + ((GridView.Current.Height /
>> 60) * Minute(Now))
>>
>> In Gambas3, GridView.Current.Y seems to give the relative position from
>> the upper edge of the whole grid, even when it is not visible. That
>> means, instead of values like 745, it now receives 1035, so the Baines
>> Line will be too low to appear.
>>
>> What would you use instead of Current.Y to hit the right square of the
>> GridView?
>>
>> Thanks for your help.
>>
>> Regards
>> Rolf
>>
>>
> 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





More information about the User mailing list