Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by tep on Nov 11, 2007 19:34
open dhtmlx forum
synchronizing scroll bars

hi..

thank you for the response on my other question..

i have another question..
i have 2 grid objects..can i synchronize their scroll bars?specifically vertical.. meaning if i move the scroll bar of grid1, grid2 to will also move as if i move grid2's scroll bar also..
and can i hide scroll bars?thank you very much..

hope to hear from you again..
Answer posted on Nov 12, 2007 04:08
>>and can i hide scroll bars?

you can disable scrollbars by adding next line to grid initialization code

    mygrid.objBox.style.overflow="hidden";


>>i have 2 grid objects..can i synchronize their scroll bars?

this can be done as

grid1.attachEvent("onScroll",function(x,y){
    grid2.objBox.scrollTop=y;
});

grid2.attachEvent("onScroll",function(x,y){
    grid1.objBox.scrollTop=y;
});