Proper docking with 2 forms using panels and tabs.


Author
Message
jody cummings
jody cummings
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)
Group: Forum Members
Posts: 7, Visits: 1

Thanks Angel the user control is a much better idea.

 


Angel Chorbadzhiev
Angel Chorbadzhiev
Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)
Group: Forum Members
Posts: 139, Visits: 184

Hi Jody,

I guess you do something similar to the following:

Form form2 = new Form();

form2.TopLevel = false;

nTabPage1.Controls.Add(form2);

form2.Show();

 

To make the form to fill the whole area you can add the following:

form2.Dock = DockStyle.Fill;

form2.WindowState = FormWindowState.Maximize;

However, my suggestion is instead of using this second form to use UserControl.

I hope I understand the problem correctly in order to suggest you a correct solution.

Regards,

Angel.

 


jody cummings
jody cummings
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)
Group: Forum Members
Posts: 7, Visits: 1

I have 2 forms. One is a start form with a tabcontrol on it.

The other form has multiple panels.

I am able to add the form to the start forms tabcontrol at runtime but i cannot figure out how to make it fill the whole area.

I have the start forms tabcontrol set to fill.

On the second form i set all panels to fill.

Not sure what i am missing.

I have attached a screenshot to help show what i mean.

Thank you

Jody C


Attachments
Screenie.jpg (128 views, 161.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search