Hello all,
In a program I'm writing for my PocketPC, I have this form to which
I add a variable number of special UserControl-based controls before
displaying it based on the number of items in the file the user has
chosen. The idea is that if the chosen file has more items than can
be show, the form will just scroll up and down.
If my UserControl is less than the client width, or even the exact
same width, when I get to the point where thew combined height of my
controls is greater than the height of the form's client area, the
vertical scrollbar never gets displayed. Never, ever, no matter how
many controls I add.
If my UserControl is wider than the form's client area when added
with form.Controls.Add() and I later resize it down to the proper
width, then the vertical scrollbar does appear. Unfortunately, the
horizontal scrollbar also appears for a moment until the newly added
control is resized down to the client width of the form.
That momentary appearance of the horizontal scrollbar is annoying,
but I cannot figure out how to prevent it.
How do I prevent the horizontal scrollbar from appearing but still
make sure my control will scroll when too many controls are added?
Thanks in advance.