I am adding user control to listbox. Everything works fine but i have a problem that when i add 10 user controls then i am expecting that listbox should show scroll so that i can select items at the end of listbox but this never happens even after setting show scroll property to true.
here is my code
UserControl1 button = new UserControl1();
button.Location = new Point(10, 100 * i + 10);
button.Size = new System.Drawing.Size(560, 59);
button.MessageUsername = "Wao this is great";
listBox1.Controls.Add(button);
I am open to ideas
here is the picture you can see that there is no scroll 
Where do people get the idea that a
ListBoxis a container control? That’s not what aListBoxis for, it’s not designed to hold child controls added with theControls.Addmethod. You’re supposed to add (and otherwise manage) the items it displays using its aptly-namedItemsproperty.There’s no scroll bars visible because you’ve just overlaid each of the child controls on top of one another. The
ListBoxitself doesn’t know about them, so it doesn’t know that it needs to scroll them.You should be using some type of panel control, either the
Panelcontrol itself, or better yet one that will manage layout for you automatically. Investigate theFlowLayoutPanelorTableLayoutPanel. All of those controls have anAutoScrollproperty you can set to “True” that will automatically show the scrollbars whenever their contents exceed the visible client area.