无法从表格底部删除填充

时间:2014-05-22 23:10:47

标签: c# .net windows winforms padding

有人能告诉我如何从没有填充的表单中删除底部填充?

表单填充属性设置为:

this.Padding = new System.Windows.Forms.Padding(0, 0, 0, 0);
FormBorderStyle=sizable

但表格有底部填充......

我可以做一个新的,但我更喜欢理解该形式的行为。

enter image description here

http://heldervaldez.com/WinForm.png

和Code FormMainDesigner.cs:

// FormMain
 // 
 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
 this.AutoSize = true;
 this.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange;
 this.BackColor = System.Drawing.SystemColors.Control;
 this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
 this.CausesValidation = false;
 this.ClientSize = new System.Drawing.Size(1278, 758);
 this.ControlBox = false;
 this.Controls.Add(this.toolStrip1);
 this.Controls.Add(this.menuStrip1);
 this.Controls.Add(this.labelEmail);
 this.Controls.Add(this.statusStrip1);
 this.Controls.Add(this.radDock1);
 this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
 this.ForeColor = System.Drawing.SystemColors.ControlText;
 this.HelpButton = true;
 this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
 this.IsMdiContainer = true;
 this.MainMenuStrip = this.menuStrip1;
 this.Name = "FormMain";
 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
 this.Text = "Sistema de Monitorização Energética";
 this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
 this.Load += new System.EventHandler(this.FormMain_Load);
 ((System.ComponentModel.ISupportInitialize)(this.citiesBindingSource)).EndInit();
 ((System.ComponentModel.ISupportInitialize)(this.dataSetGeografia)).EndInit();
 this.menuStrip1.ResumeLayout(false);
 this.menuStrip1.PerformLayout();
 this.statusStrip1.ResumeLayout(false);
 this.statusStrip1.PerformLayout();
 this.contextMenuStripRoot.ResumeLayout(false);
 this.contextMenuStripTensionTypes.ResumeLayout(false);
 this.contextMenuStripCUnit.ResumeLayout(false);
 this.toolStrip1.ResumeLayout(false);
 this.toolStrip1.PerformLayout();
 ((System.ComponentModel.ISupportInitialize)(this.radDock1)).EndInit();
 this.radDock1.ResumeLayout(false);
 ((System.ComponentModel.ISupportInitialize)(this.toolTabStrip1)).EndInit();
 this.toolTabStrip1.ResumeLayout(false);
 ((System.ComponentModel.ISupportInitialize)(this.documentContainer1)).EndInit();
 ((System.ComponentModel.ISupportInitialize)(this.toolTabStrip2)).EndInit();
 this.toolTabStrip2.ResumeLayout(false);
 this.ResumeLayout(false);
 this.PerformLayout();

2 个答案:

答案 0 :(得分:0)

我认为这些行之间存在冲突: 删除

this.AutoSize = true;

this.ClientSize = new System.Drawing.Size(1278, 758);

根据MSDN,AutoSize旨在保证所有控件都适合页面而不滚动。之后使表格变得更大可能是好的..因此在状态栏之前有额外的空间,可能是它应该停靠在底部。

答案 1 :(得分:0)

问题解决了。它是Form底部的一个隐形标签。只需要删除标签。 下图显示了标签。 http://heldervaldez.com/label.png 感谢您的帮助。