private TableLayoutPanel CreateLayoutpan() { pTablePanel = new TableLayoutPanel(); pTablePanel.BackColor = System.Drawing.SystemColors.ButtonFace; pTablePanel.ColumnStyles.Add (새 ColumnStyle (SizeType.Absolute, 30)); pTablePanel.RowStyles.Add (새 RowStyle()); pTablePanel.Size = new System.Drawing.Size (165, 223); pTablePanel.Location = new System.Drawing.Point (9, 14); pTablePanel.TabIndex = 0; pTablePanel.Controls.Clear(); pTablePanel.ColumnCount = 2; return pTablePanel; } 여기에서 TableLayoutPanel 컨트롤을 찾으십시오.
PictureBox pict;
private void AddtoPbx(Image im)
{
try
{
pict = new PictureBox();
pict.BackColor = System.Drawing.Color.Blue;
pict.Padding = new Padding(2);
pict.Image = m; pict.Width = 100;
pict.Height = 60;
pict.SizeMode = PictureBoxSizeMode.StretchImage;
CheckBox chkBx = new CheckBox();
chkBx.Name = "checkImage";
chkBx.Location = new System.Drawing.Point(40, 40);
pTablePanel.Controls.Add(chkBx, 0, iCount);
pTablePanel.Controls.Add(pict, 1, iCount);
iCount++;
pTablePanel.AutoScroll = true;
System.Threading.Thread.Sleep(50);
pict.Focus();
STA_gbxImages.Controls.Add(pTablePanel);
}
catch (Exception ex)
{ }
}
내가 행에 chkbox뿐만 아니라 이미지를 추가 할 것이다 .... 지금 내 문제는 chkbox 내가 어떻게 다른 모음 ....에 ccorresponding 이미지를 추가 할 필요가 체크되어있는 경우 이 일을 도와주세요 ...