bartvb
10-08-2001, 05:55 AM
I have two controls (grids) with each their own horizontal scrollbar. (and same width)
Is it possible that they follow the "scrolling" of the other grid ?? So when you change the horizontal position of the first, the same happens to the second.
thanx, Bart
Banjo
10-08-2001, 06:41 AM
In the Scroll event set the TopRow and LeftCol properties equal. Then when you scroll one the other will follow:
<pre>Private Sub MSFlexGrid1_Scroll()
MSFlexGrid2.TopRow = MSFlexGrid1.TopRow
MSFlexGrid2.LeftCol = MSFlexGrid1.LeftCol
End Sub
Private Sub MSFlexGrid2_Scroll()
MSFlexGrid1.TopRow = MSFlexGrid2.TopRow
MSFlexGrid1.LeftCol = MSFlexGrid2.LeftCol
End Sub</pre>
bartvb
10-08-2001, 07:06 AM
great !! It works!
(now i can also hide one of the two scrollbars...)
thanx Banjo!!
Banjo
10-08-2001, 07:13 AM
I don't think you can. I encountered a similar problem. The flexgrid won't scroll at all if the appropriate scroll bar is not enabled, even in code.
The only way I found to get around this was to put the grid in a frame or sheridan panel and make the grid slightly bigger. This puts the scroll bar outside the visible part of the container. Its a bit messy a doesn't always look very good.