Okay, I have a problem with scrolling in a panel.

I have a panel on my main form that has vertical scrollbars enabled. I also have a custom control I have built that is the same width as the panel and has a height of 45. I store multiple of my user controls in an array, and I want the panel to display these controls like a listbox... one stacked on top of the other. So I loop through the array and add each control to the panel at coordinates right under the previous one.

This works fine, and as long as I use the the mouse to scroll down and expose the controls I'm interested in and then clicking on that control, things work great. The problem comes in when I want to use the arrow key to move down to the next control. If the next control is visible on the panel, it works fine.

This is where it gets strange.

Assume I've arrowed down to the last control displayed on the panel, and then I hit the down arrow key one more time. What happens is that the control is selected and theoretically has focus (a focus() was called for that control), but it doesn't scroll down and display the active control. I can hit down arrow multiple times, and though it happily activates the next control in line each time, it does not scroll... though the control flickers as though a paint was executed.

After I programatically set the new control, I try to scroll down to it using panel1.ScrollControlIntoView(control)... and yes, the panel does have AutoScroll set to true. So it SHOULD scroll down... but it doesn't.

Now let's change things slightly. Assume I MOUSE CLICK on the last displayed control (as opposed to arrowing down to it as in the above example), and then I hit the down arrow key. It not only activates the next control, IT SCROLLS DOWN ONE TO SHOW IT! I can then use the down arrow three or four times and it works... then stops working again with the behavior observed above

I do not know what the problem is. Am I missing something? How am I supposed to scroll to a specific control on the panel?