문제

I have ScrollableControl inheritor and i want to draw elements (like header) which are not scrollable during scrolling.

Is there any solution?

도움이 되었습니까?

해결책

It seems there is no way to do that. When control is scrolled up for example, all content scrolled (copied) by ScrollWindow API call, and the rest part of control is invalidated.

All other hacks like handling scroll events and drawing over the control surface are not suitable.

다른 팁

you must calculate with AutoscrollOffset property in your layoutlogic.

I had the same problem. I tried overriding the OnScroll event to invalidate a "fixed top-bar", but the results are jaggy and unsatisfactory.

In the end, I opted for a panel child-control on top of the scrollable region.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top