How to draw unaffected items on a ScrollableControl

I have a ScrollableControl inheritor, and I want to draw elements (like a title) that don't scroll while scrolling.

Is there any solution?

+3
source share
3 answers

There seems to be no way to do this. For example, when a control scrolls, all content is scrolled (copied) by calling the ScrollWindow API, and the rest of the control is invalid.

All other hacks, such as handling scroll events and drawing over a control surface, are not suitable.

+1
source

AutoscrollOffset .

0

I had the same problem. I tried to override the OnScroll event to nullify the “fixed top bar”, but the results were uneven and unsatisfactory.

In the end, I selected a child of the panel above the scroll pane.

0
source

Source: https://habr.com/ru/post/1746533/


All Articles