>I have two stringgrids with exactly the same columns, basically something like 
>Excel autofilter.

>Does anybody have an idea how to change the scrollposition of a stringgrid 
>depending on the scrollpos of the other?



One way would be using OnSelection event and try something like:

sg1.LeftCol := sg2.LeftCol;
sg1.TopRow:=sg2.TopRow;

sg1 will be synchronized to sg2.

That would give you row/col size granularity. For pixel granularity, without 
messing with grids internals, could be done using GetScrollInfo for both 
scrollbars on source grid and using SetScrollInfo for both scrollbars on target 
grid. Not tried but should work :)

Jesus Reyes A.
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to