(Part 1) I want to add 8 checkboxes to every dynamically created tabpage. I tried following but it adds a check box on the last tabpage. How to add 8 chckboxes to every tab page (say 10 tab pages)
(Part 2) Since we do not know the index of checkbox created, I am unable to understand how to link a groupbox with a “checkbox.checked” condition. Any help will be really appreciated.
Dim chkbx As New CheckBox
For j = 1 To 10 '#10 tab pages considered
Form4.TabControl1.TabPages.Add(j)
Form4.TabControl1.TabPages(j).Text = "Folder" & j + 1
Form4.TabControl1.TabPages(j).Controls.Add(chkbx)
chkbx.Text = "folder1name "
chkbx.Size = New Size(220, 17)
Next (j)
Thanks
Create CheckBox instance each time in
forloopand use
Controls.Find()method to get the reference ofcontrol.