I am stuck in creating check boxes in C#. I have to Dynamically generate check boxes on my dynamically generated picture boxes(images) on a button click(Delete).I have used few code of c# but never worked according to my requirement. following code generates checkbox on my form but not on Picture box. Please Suggest me some idea so that my checkbox gets linked to picturebox`.
private void btndlt_Click(object sender, EventArgs e)
{
add_chkbx();
}
public CheckBox add_chkbx()
{
CheckBox chk = new CheckBox();
chk.Location = new System.Drawing.Point(15, 190);
chk.Size = new System.Drawing.Size(30, 30);
this.Controls.Add(chk);
return chk;
}
`.
Thanks in advance
Aucun commentaire:
Enregistrer un commentaire