Y
YYZ
I discovered something very interesting today, and it will save me a
bunch of time...maybe.
If you set Panel1.Autoscroll to true, and have a panel2 inside of it, I
can add all sorts of controls at runtime, and panel1 will develop
scrollbars to take all of this into account. Except for 1 little
really annoying feature.
When it displays vertical scrollbar (which is good), that space that is
taken up by the vertical scrollbar now makes the panel think that it
needs a horizontal scrollbar, too.
I have code that resizes panel2 to be the same width as panel1, and
that is the problem. Anyone know of a way to find out if panel1 has a
vertical scrollbar, and if so, figure out the width of it, so that I
can decrease the size of panel2 to take this into account and then the
panel won't display a horizontal scrollbar as well?
Did that make sense? Anyone have any ideas for me?
Matt
bunch of time...maybe.
If you set Panel1.Autoscroll to true, and have a panel2 inside of it, I
can add all sorts of controls at runtime, and panel1 will develop
scrollbars to take all of this into account. Except for 1 little
really annoying feature.
When it displays vertical scrollbar (which is good), that space that is
taken up by the vertical scrollbar now makes the panel think that it
needs a horizontal scrollbar, too.
I have code that resizes panel2 to be the same width as panel1, and
that is the problem. Anyone know of a way to find out if panel1 has a
vertical scrollbar, and if so, figure out the width of it, so that I
can decrease the size of panel2 to take this into account and then the
panel won't display a horizontal scrollbar as well?
Did that make sense? Anyone have any ideas for me?
Matt