Paolo
Paolo

Reputation: 377

Smooth scroll in Windows Forms ListBox

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

Answers (3)

fyasar
fyasar

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

Hans Passant
Hans Passant

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

Raumornie
Raumornie

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

Related Questions