简体   繁体   English

高度和宽度C#面板

[英]Height and Width C# Panel

I have a problem. 我有个问题。 When I create my panel and I ask size (150;150) and I execute the program I dont have the good size. 当我创建面板并要求尺寸(150; 150)并执行程序时,我没有合适的尺寸。 So if ask the witdh and heigth I obtain (112;122).. 因此,如果问问witdh和heigth,我得到了(112; 122)。

Do you have some idea for reason it? 你有什么主意吗?

Thank you 谢谢

this.Zone_Impression.BackColor = System.Drawing.Color.White;
this.Zone_Impression.Location = new System.Drawing.Point(10, 10);
this.Zone_Impression.Margin = new System.Windows.Forms.Padding(0);
this.Zone_Impression.MinimumSize = new System.Drawing.Size(150, 150);
this.Zone_Impression.Name = "Zone_Impression";
this.Zone_Impression.Size = new System.Drawing.Size(150, 150);
this.Zone_Impression.TabIndex = 0;

也许panel.AutoSize == true

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM