Is there a way to get AutoScroll scroll to fire event during scrol

T

trant

I have a component with AutoScroll set to true.

When scrollbars are visible and I start adjusting it it does not repaint my
component until I let go off the scroll bar.

I would like it to continuously fire events as I scroll it instead of wait
for me to let go.

Is this possible?

For good example just use the scorll bar on your browser right now. See how
it repaint the page while you scroll instead of waiting for you to let go ?
Thats what I would like to have
 
P

Peter Duniho

trant said:
I have a component with AutoScroll set to true.

When scrollbars are visible and I start adjusting it it does not repaint my
component until I let go off the scroll bar.

I would like it to continuously fire events as I scroll it instead of wait
for me to let go.

Is this possible?

You mean, like handling the Scroll event, declared in the
ScrollableControl class?

My recollection is that paint messages are sent during scrolling by
default, so perhaps you have some system configuration or code setting
that's disabled that for some reason. But at the very least, you should
be able to handle the Scroll event to achieve the same behavior.

Pete
 
T

trant

Hi Peter, thank you for your reply!

Now that you mentioned it I realized why this is behaving this way on my
application.

On Paint I only draw a portion of my buffered image in relation tot he
current AutoScrollPosition.

Since this position is not being updated by the default Scroll event, it
kept calling my paint for the same position so I was seeing the same image,
until the scroll bar was let go which finally updated the AutoScrollPosition

So I added a listener to the Scroll event and had it update the
AutoScrollPosition and now it's working perfectly.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top