Reputation: 2072
I've been developing an app for a while now that has a textbox with a vertical scrollbar. It's worked perfectly up until today. Today, after making some changes unrelated to scrolling, I noticed that the scrollbar wasn't moving up and down when I drag it with the mouse. The textbox that owns the scrollbar scrolls just fine, but the scrollbar doesn't move till I release the mouse button!
This is extremely annoying, and confusing for users of my application. My question is this: what would cause such a thing to happen, and how can I fix it?
Upvotes: 2
Views: 665
Reputation: 2072
The cause of the scrollbar not moving was my use of this overridden property:
protected override CreateParams CreateParams
{
get
{ // Turn on WS_EX_COMPOSITED
CreateParams cp = base.CreateParams; cp.ExStyle |= 0x02000000;
return cp;
}
}
I was using it to ensure double-buffering on all controls, but it had unintended side effects.
Upvotes: 2