views:

168

answers:

1

In my Windows Forms application, I'm using a FlowLayoutPanel control to display a list of items to users. I've been able to successfully implement reordering the items in the FlowLayoutPanel by having the user drag the control to the desired position within the FlowLayoutPanel.

But I don't know how to scroll the FlowLayoutPanel when the user drags an item past the boundaries of the panel. I've seen examples for ListView controls but those techniques don't seem to apply to the FlowLayoutPanel.

Can someone provide sample code, preferably in c#, on how to implement this functionality?

I can provide code examples of my current reordering methodology if desired.

Thanks!

A: 

Add a call to the ScrollControlIntoView() method after a control has been moved.

Stephen Fletcher