On 07/09/2010 16:16, Jesus Reyes wrote:
> 
> 
> --- El mar 7-sep-10, Lukasz Sokol <[email protected]> escribió:
> 
>> De: Lukasz Sokol <[email protected]>
>> Asunto: Re: [Lazarus] String Grid MouseToCell seems inconsistent when 
>> deleted some columns
>> A: "Lazarus mailing list" <[email protected]>
>> Fecha: martes, 7 de septiembre de 2010, 10:01
>> Hello faber,
>>
>> On 07/09/2010 15:45, faber wrote:
>> [...]
>>>
>>> try with
>> StringGrid1.MouseToCell(ScreenToClient(Mouse.CursorPos))
> 
> [...]
> 
>> Oh... yes that solved the issue. Sorry for the noise :) i
>> was searching for
>> the ScreenToClient, but $Deity knows why I was looking for
>> it as procedure of
>> the StringGrid itself :)
>>
> 
> Indeed it should, and the correct translation of coordinates should be made 
> with StringGrid1 
> 
> StringGrid1.MouseToCell(StringGrid1.ScreenToClient(Mouse.CursorPos))
> 
> otherwise MouseToCell would get parent form coordinates.
> 
> Jesus Reyes A.
> 
Bingo again :)
for some reason StringGrid1.ScreenToClient did not show in code completion 
(tried a few times
then decided there isn't any...) i guess what saved me was that the whole of 
form is filled
with the grid.


Lukasz
> 
>       
> 
> --
> _______________________________________________
> Lazarus mailing list
> [email protected]
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
> 


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to