Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // something like this but I need to fill in each elements of the matrix...
- private void CreateSpecificControl(string requestedType)
- {
- if (requestedType == "CheckBox")
- {
- CheckBox control1 = new CheckBox();
- control1.Click += new EventHandler(chk_CheckedChanged);
- //TableLayout panel
- layout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25));
- layout.Controls.Add(control1);
- }
- else
- {
- Label control1 = new Label();
- control1.Text = "Not a checkbox";
- layout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25));
- layout.Controls.Add(control1);
- }
- }
- myUserControl.Controls.Add(new CheckBox());
Add Comment
Please, Sign In to add comment