Print Page | Close Window

TabControl inside an MDI Child Window

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2866
Printed Date: 17 November 2024 at 1:48pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: TabControl inside an MDI Child Window
Posted By: djheath
Subject: TabControl inside an MDI Child Window
Date Posted: 09 September 2005 at 4:30pm
So I have the need to create a Tabbed MDI child window and see that there is a problem when the form that is associated with each tab has the docking property set to 'Fill'.

Essentially, the docking property really thinks it means 'fill' and as such the tabs are no longer available (the form is filling the entire MDI child window.)

I'm working in C# and below is my code:

private void formDocument_Load(object sender, System.EventArgs e) {
     affinityRun = new formDataRun();
     affinityRun.Parent = TabControl;
     affinityRun.Dock = System.Windows.Forms.DockStyle.Fill;
     Object x = TabControl.InsertItem(0, "Affinity", affinityRun.Handle.ToInt32(), 300);

     desaltingRun = new formDataRun();
     desaltingRun.Dock = System.Windows.Forms.DockStyle.Fill;
     TabControl.InsertItem(1, "Desalting", desaltingRun.Handle.ToInt32(), 300);

     TabControl.Icons = (XtremeSuiteControls.ImageManagerIcons)ImageManager.Icons;
     TabControl.PaintManager.Positi on = XtremeSuiteControls.XTPTabPosition.xtpTabPositionLeft;
     TabControl.PaintManager.Layout = XtremeSuiteControls.XTPTabLayoutStyle.xtpTabLayoutFixed;
}

the formDataRun is a simple Windows Form with an inner panel (the contents of which have been determined to be immaterial, through some testing.)

Everything looks okay if I remove the dock assignment, but it'll look pretty silly if the user maximizes the window and the inner panel stays the same size.

Anyone else run into this situation? Thanks in advance,

-djh



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net