Hello,
I was continued playing with your docking windows.
How can I get following layout (created with designer) at runtime programmatically?Now delete "designer docking window" in designer and insert following code:
Should it not produce the same behaviour?
The new window is not visible unless I resize the form manually.
Following code shows the window correctly, but the auto-hide position of the new window is left and not right:One advantage more is that I need a reference to toolWindow1.
Thanks
I was continued playing with your docking windows.
How can I get following layout (created with designer) at runtime programmatically?
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.dockManager1 = new ActiproSoftware.UIStudio.Dock.DockManager(this.components);
this.toolWindow1 = new ActiproSoftware.UIStudio.Dock.ToolWindow();
this.toolWindowContainer1 = new ActiproSoftware.UIStudio.Dock.ToolWindowContainer();
this.toolWindow2 = new ActiproSoftware.UIStudio.Dock.ToolWindow();
this.toolWindowContainer2 = new ActiproSoftware.UIStudio.Dock.ToolWindowContainer();
((System.ComponentModel.ISupportInitialize)(this.dockManager1)).BeginInit();
this.toolWindowContainer1.SuspendLayout();
this.toolWindowContainer2.SuspendLayout();
this.SuspendLayout();
//
// dockManager1
//
this.dockManager1.DocumentMdiStyle = ActiproSoftware.UIStudio.Dock.DocumentMdiStyle.ToolWindowInnerFill;
this.dockManager1.HostContainerControl = this;
//
// toolWindow1
//
this.toolWindow1.Dock = System.Windows.Forms.DockStyle.Fill;
this.toolWindow1.DockedSize = new System.Drawing.Size(485, 438);
this.toolWindow1.DockManager = this.dockManager1;
this.toolWindow1.HasTitleBar = ActiproSoftware.ComponentModel.DefaultableBoolean.False;
this.toolWindow1.Location = new System.Drawing.Point(0, 0);
this.toolWindow1.Name = "toolWindow1";
this.toolWindow1.Size = new System.Drawing.Size(531, 438);
this.toolWindow1.TabIndex = 0;
this.toolWindow1.Text = "toolWindow1";
//
// toolWindowContainer1
//
this.toolWindowContainer1.Controls.Add(this.toolWindow1);
this.toolWindowContainer1.Dock = System.Windows.Forms.DockStyle.Left;
this.toolWindowContainer1.DockManager = this.dockManager1;
this.toolWindowContainer1.Location = new System.Drawing.Point(0, 0);
this.toolWindowContainer1.Name = "toolWindowContainer1";
this.toolWindowContainer1.Size = new System.Drawing.Size(535, 438);
this.toolWindowContainer1.TabIndex = 8;
//
// toolWindow2
//
this.toolWindow2.Dock = System.Windows.Forms.DockStyle.Fill;
this.toolWindow2.DockedSize = new System.Drawing.Size(204, 438);
this.toolWindow2.DockManager = this.dockManager1;
this.toolWindow2.Location = new System.Drawing.Point(0, 25);
this.toolWindow2.Name = "toolWindow2";
this.toolWindow2.Size = new System.Drawing.Size(204, 413);
this.toolWindow2.TabIndex = 0;
this.toolWindow2.Text = "designer docking Window";
//
// toolWindowContainer2
//
this.toolWindowContainer2.Controls.Add(this.toolWindow2);
this.toolWindowContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.toolWindowContainer2.DockManager = this.dockManager1;
this.toolWindowContainer2.Location = new System.Drawing.Point(535, 0);
this.toolWindowContainer2.Name = "toolWindowContainer2";
this.toolWindowContainer2.Size = new System.Drawing.Size(204, 438);
this.toolWindowContainer2.TabIndex = 10;
//
// Form1
//
this.ClientSize = new System.Drawing.Size(739, 438);
this.Controls.Add(this.toolWindowContainer2);
this.Controls.Add(this.toolWindowContainer1);
this.IsMdiContainer = true;
this.Name = "Form1";
((System.ComponentModel.ISupportInitialize)(this.dockManager1)).EndInit();
this.toolWindowContainer1.ResumeLayout(false);
this.toolWindowContainer2.ResumeLayout(false);
this.ResumeLayout(false);
}
private ActiproSoftware.UIStudio.Dock.DockManager dockManager1;
private ActiproSoftware.UIStudio.Dock.ToolWindow toolWindow1;
private ActiproSoftware.UIStudio.Dock.ToolWindowContainer toolWindowContainer1;
private ActiproSoftware.UIStudio.Dock.ToolWindowContainer toolWindowContainer2;
private ActiproSoftware.UIStudio.Dock.ToolWindow toolWindow2;
public Form1()
{
InitializeComponent();
toolWindow = new ToolWindow(dockManager1, null, "Runtime docking window", -1, null);
toolWindow.DockedSize = new Size(100, Height);
toolWindow.DockTo(dockManager1, DockOperationType.RightInner);
toolWindow.Activate(false);
}
The new window is not visible unless I resize the form manually.
Following code shows the window correctly, but the auto-hide position of the new window is left and not right:
public Form1()
{
InitializeComponent();
toolWindow = new ToolWindow(dockManager1, null, "Runtime docking window", -1, null);
toolWindow.DockedSize = new Size(100, Height);
toolWindow.DockTo(toolWindow1, DockOperationType.RightInner);
toolWindow.Activate(false);
}
Thanks