I created a class extending TableLayoutPanel containing 3 columns of a CheckBox and two RichTextBoxes , I can edit and write in the textboxes but I CheckBox is not responding here's the code :
public class StepPanel : TableLayoutPanel
{
public RichTextBox result;
public CheckBox checkBox;
public RichTextBox step;
public StepPanel()
{
this.result = new RichTextBox();
this.label = new CheckBox();
this.step = new RichTextBox();
this.ColumnCount = 3;
this.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 50F));
this.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.Controls.Add(this.checkBox, 0, 0);
this.Controls.Add(this.step, 1, 0);
this.Controls.Add(this.result, 2, 0); }
I then add some StepPanel's to another panel in runtime the checkbox does not change it's state when I click on it , what is wrong there ?
Aucun commentaire:
Enregistrer un commentaire