我在 tablelayoutpanel 单元格中有一个 Class(Conatiner) 对象。我想访问该特定字段中的文本字段。如何在单击按钮时获取值?
我想使用 Channel 以及 X 和 Y 值访问 1 2 3 。但我不知道 tableLayoutPanel 中的数字对象
这是我到目前为止写的代码
private void masterTab1_SaveButton_Click(object sender, EventArgs e)
{
var colWidths = this.MatrixPanel.GetColumnWidths();
var rowHeights = this.MatrixPanel.GetRowHeights();
int col = -1, row = -1;
int offset = 0;
for (int iRow = 0; iRow < this.MatrixPanel.RowCount; ++iRow)
{
offset += rowHeights[iRow];
row = iRow;
for (int iCol = 0; iCol < this.MatrixPanel.ColumnCount; ++iCol)
{
offset += colWidths[iCol];
col = iCol;
var myCellControl = MatrixPanel.GetControlFromPosition(col, row);
if (myCellControl is Container)
{
Adapter.insertposition(RackID, row, col, //Want the Channel Value , "Ready");
}
}
}
}