-
Notifications
You must be signed in to change notification settings - Fork 3
Using the Control
Jack Siro edited this page Oct 16, 2020
·
4 revisions
- Add the MdiTabCtrl to a form
- Dock the control in it
- Change all the properties through the designer.
Form cform; //Declare child Form
cform = new ChildForm(); //call an instance of a class you want to show in a tab
tabcount = tabcount + 1;
cform.Text = "This is Tab " + tabcount; //Declare text for this tab
TabControl1.TabPages.Add(cform);
- You don't show the form, instead you just add it to the control. Very simple, isn't it? On an existing program, you just need to add the control to the main form, and where you have the Show call for the form, you just replace by the Add method.