Pergunta

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

Is there any solution?

Foi útil?

Solução

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.

Outras dicas

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top