Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
205
Synchronizing grid scrollbars to another control
posted
Hi! I have an issue with scrolling. I have my custom drawn controls that are overlayed over the grid, meaning they're not attached to it in any way, rather having a dedicated manager that manages the interaction. Problem arrises when i want to scroll the grid horizontally and i want my overlays to synchronize their movement too. I'm using AfterColRegionScroll event where i calculate the movement and move overlays accordingly and it works fine except for the flicker that's there because scroll happens first and then overlays move. Now, is there any way to do it simultaneously? i know that it's not a grid issue per se, but i'm sure you guys encountered similar problems with other users. Thanx, M.
Parents
  • 469350
    Verified Answer
    Offline posted

    I don't know of any way to do this for sure, it will require a bit of experimentation. You might want to try stopping the grid from painting until you have moved all of your controls and see if that helps. What you could do is use the BeforeColRegionScroll event and call grid.BeginUpdate. This will prevent the grid from painting. 

    Then in AfterColRegionScroll, you could position your own controls and then call EndUpdate on the grid to let it paint again. 

    I'm not sure how much that will help, if any, but it seems like it might be worth a shot. 

    Or perhaps what you can do is hide your controls in BeforeColRegionScroll and then move them and re-show them in the After event? 

     

Reply Children
No Data