Thank you, I have tried it.
There was a problem, that after first resize, it was not possible to scroll with horizontal scrollbar anymore (probably because HScrollPixelPosChanging was canceled in event handler). I noticed same behaviour in your example.
So for now I made this change in my code:
void hGrid_HScrollPixelPosChanging(...)
{
if (m_bCancelScroll) {
e->Cancel = true;
m_bCancelScroll = false;
}
}
and in hGrid_ResizingColumns I added
m_bCancelScroll = true;
so now scrolling is canceled only if comes from ResizingColumns and not for example from moving the scrollbar. Is it correct?
But there is one more scrolling I want to cancel, I will try to explain: I have 3 columns - first is wider than grid width, second and third are small. I scroll to right side (see my screenshot). Now when I make first column smaller (resize it) it is not possible for scrollbar stay on the same position (because whole width of grid is reduced), so it jumps to the start of first column again. Is it possible for scrollbar to stay on the right edge?
Hope you understand what I mean,
Thank you!
grid01.zip