Odd sizing problem

B

B. Chernick

I'm writing a Winforms app (Dot Net 2.0, VS2005, VB).

I have a simple usercontrol with 2 panels on it, one with labels, one with a
variety of editing controls, mostly datetimepickers and NumericUpDowns. A
number of these usercontrols are then instantiated and put on a form in
another project.

The problem is this: The panel containing the controls is apparently
expanding and increasing the space between controls, both height and width
(so that part of it is hidden when the control displays). There is code that
changes the width of the usercontrol itself and the position of the panel
within the usercontrol, but no code whatever to change the width of the panel
or height of anything. Autosize for the panel is False.

What could I be forgetting?
 
R

rhaazy

I'm writing a Winforms app  (Dot Net 2.0, VS2005, VB).  

I have a simple usercontrol with 2 panels on it, one with labels, one with a
variety of editing controls, mostly datetimepickers and NumericUpDowns.  A
number of these usercontrols are then instantiated and put on a form in
another project.  

The problem is this:  The panel containing the controls is apparently
expanding and increasing the space between controls, both height and width
(so that part of it is hidden when the control displays).  There is code that
changes the width of the usercontrol itself and the position of the panel
within the usercontrol, but no code whatever to change the width of the panel
or height of anything.  Autosize for the panel is False.

What could I be forgetting?

anchor your controls properly
 
B

B. Chernick

?? Define 'properly'. All of the controls and both panels are anchored
Top-Left.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top