Reputation: 377
Is there a way to enable smooth scroll for ListBox class in Windows Forms framework? (I'm using C# and .NET framework 2.0).
Upvotes: 2
Views: 3718
Reputation: 3996
Also you take a look Implementing a smoothly animated ListBox in the codeproject.com Fredrik Bornander wrote same control, but this control writted according to windows mobile, but i think you can easy migrate your windows forms projects.
It might be able to give you new ideas.
Upvotes: 1
Reputation: 942109
It is a system setting. You could change it by P/Invoking SystemParametersInfo with the SPI_SETLISTBOXSMOOTHSCROLLING argument. Doing so is not recommended.
Upvotes: 5
Reputation: 1444
No there isn't, not in WinForms anyway.
WPF has a feature that can be enabled to do this, and there is a smooth scrolling animation that can be enabled in vista that can give the appearance of smooth scrolling, though it's really just an animated transition. But the scrolling in a ListBox is, as far as I can tell, is hardcoded to do one item at a time.
Upvotes: 1