我遇到了一些WinForms的奇怪问题。 我的表格是这样构建的:
http://www.imagebanana.com/view/rju2ufus/View.JPG
我需要在右上角添加一些其他元素(固定到面板的几个进度条) 但设计师不会让我放置它们(光标转到“停在这里”) 我也不能通过代码添加额外的面板。
以下是TL的属性
this.tableLayoutPanelMain.ColumnCount = 2;
this.tableLayoutPanelMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 466F));
this.tableLayoutPanelMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanelMain.Controls.Add(this.statusStripBaseboard, 0, 3);
this.tableLayoutPanelMain.Controls.Add(this.tableLayoutPanelRightSideCamera, 1, 1);
this.tableLayoutPanelMain.Controls.Add(this.panelPositioner, 0, 2);
this.tableLayoutPanelMain.Controls.Add(this.panelVirtualView, 0, 1);
this.tableLayoutPanelMain.Controls.Add(this.menuStrip1, 0, 0);
this.tableLayoutPanelMain.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanelMain.Name = "tableLayoutPanelMain";
this.tableLayoutPanelMain.RowCount = 4;
this.tableLayoutPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F));
this.tableLayoutPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 486F));
this.tableLayoutPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F));
this.tableLayoutPanelMain.Size = new System.Drawing.Size(1086, 741);
this.tableLayoutPanelMain.TabIndex = 3;
// Form2
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1086, 741);
this.Controls.Add(this.tableLayoutPanelMain);
this.DoubleBuffered = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.KeyPreview = true;
this.MainMenuStrip = this.menuStrip1;
this.MinimumSize = new System.Drawing.Size(1050, 768);
this.Name = "Form";
this.Text = "T2";
this.Resize += new System.EventHandler(this.FormBFNT2_Resize);
this.tableLayoutPanelMain.ResumeLayout(false);
this.tableLayoutPanelMain.PerformLayout();
this.statusStripBaseboard.ResumeLayout(false);
this.statusStripBaseboard.PerformLayout();
this.tableLayoutPanelRightSideCamera.ResumeLayout(false);
this.tableLayoutPanelLiveView.ResumeLayout(false);
this.panelPositioner.ResumeLayout(false);
this.groupBoxPositionerXYZ.ResumeLayout(false);
this.groupBoxPositionerXYZ.PerformLayout();
this.panelTargetZ.ResumeLayout(false);
this.panelTargetZ.PerformLayout();
this.panelTargetXY.ResumeLayout(false);
this.panelTargetXY.PerformLayout();
this.panelStepXY.ResumeLayout(false);
this.panelStepXY.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.trackBarStepXY)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.trackBarVelocityXYZ)).EndInit();
this.panelStepZ.ResumeLayout(false);
this.panelStepZ.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.trackBarStepZ)).EndInit();
this.panelModes.ResumeLayout(false);
this.panelVirtualView.ResumeLayout(false);
this.groupBoxVirtualView.ResumeLayout(false);
this.groupBoxVirtualView.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureChamber)).EndInit();
this.groupBoxCalibration.ResumeLayout(false);
this.groupBoxCalibration.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCalibration)).EndInit();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
}
// Initialize
private void InitializeComponent()
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form2));
this.tableLayoutPanelMain = new System.Windows.Forms.TableLayoutPanel();
...