Hello there,
A requirement came down where we need to allow forms to be scrollable in our application. In our app all of our forms are 'docked' in an ultraTabbedMdiManager. I thought this would be a very simple fix where I set Form1.AutoScroll = true. However it did not work. So I researched the internet and I read that if you set the minimum size of the form then the MdiManger would automaticall add the scroll bars.
This worked, insofar as the scrollbars appeared; however, when you actually use the scrollbars the forms do not scroll. It seems like a bug. Not sure if I am doing things correctly.
Any help would be greatly appreciated.
Cheers!
Hello Chris,
Could you please provide steps to reproduce and/or an isolated sample reproducing the behavior?
Here is a copy paste project. I made it as simple as possible, sorry if it is long.
Click the top left button and a form will be created with 30 buttons docked within. There is a blue button at the very end (out of site in the form).
You will see there are scroll bars; however, they do not work. You can never scroll to see the blue button far to the right:
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;
namespace UltraMDITabTest{ public partial class Form1 : Form { public Form1() { InitializeComponent(); this.utMDIManager.MdiParent = this; }
private void button1_Click(object sender, EventArgs e) { Form f = new Form();
Button g = new Button(); g.Dock = DockStyle.Left; g.BackColor = Color.Aqua; f.Controls.Add(g);
for (int i = 0; i < 30; i++) { Button b = new Button(); b.Dock = DockStyle.Left; f.Controls.Add(b); }
f.MdiParent = this; f.MinimumSize = new Size(600, 600); f.Show();
this.Size = new Size(500, 300); } }
partial class Form1 { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null;
///// <summary> ///// Clean up any resources being used. ///// </summary> ///// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> //protected override void Dispose(bool disposing) //{ // if (disposing && (components != null)) // { // components.Dispose(); // } // base.Dispose(disposing); //}
#region Windows Form Designer generated code
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance(); this.udmDocker = new Infragistics.Win.UltraWinDock.UltraDockManager(this.components); this._FormTestUnpinnedTabAreaLeft = new Infragistics.Win.UltraWinDock.UnpinnedTabArea(); this._FormTestUnpinnedTabAreaRight = new Infragistics.Win.UltraWinDock.UnpinnedTabArea(); this._FormTestUnpinnedTabAreaTop = new Infragistics.Win.UltraWinDock.UnpinnedTabArea(); this._FormTestUnpinnedTabAreaBottom = new Infragistics.Win.UltraWinDock.UnpinnedTabArea(); this._FormTestAutoHideControl = new Infragistics.Win.UltraWinDock.AutoHideControl(); this.utMDIManager = new Infragistics.Win.UltraWinTabbedMdi.UltraTabbedMdiManager(this.components); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.button1 = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.udmDocker)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.utMDIManager)).BeginInit(); this.groupBox1.SuspendLayout(); this.SuspendLayout(); // // udmDocker // this.udmDocker.AllowDrop = false; this.udmDocker.AutoHideDelay = 200; this.udmDocker.HostControl = this; // // _FormTestUnpinnedTabAreaLeft // this._FormTestUnpinnedTabAreaLeft.Dock = System.Windows.Forms.DockStyle.Left; this._FormTestUnpinnedTabAreaLeft.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this._FormTestUnpinnedTabAreaLeft.Location = new System.Drawing.Point(0, 0); this._FormTestUnpinnedTabAreaLeft.Name = "_FormTestUnpinnedTabAreaLeft"; this._FormTestUnpinnedTabAreaLeft.Owner = this.udmDocker; this._FormTestUnpinnedTabAreaLeft.Size = new System.Drawing.Size(0, 507); this._FormTestUnpinnedTabAreaLeft.TabIndex = 0; // // _FormTestUnpinnedTabAreaRight // this._FormTestUnpinnedTabAreaRight.Dock = System.Windows.Forms.DockStyle.Right; this._FormTestUnpinnedTabAreaRight.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this._FormTestUnpinnedTabAreaRight.Location = new System.Drawing.Point(813, 0); this._FormTestUnpinnedTabAreaRight.Name = "_FormTestUnpinnedTabAreaRight"; this._FormTestUnpinnedTabAreaRight.Owner = this.udmDocker; this._FormTestUnpinnedTabAreaRight.Size = new System.Drawing.Size(0, 507); this._FormTestUnpinnedTabAreaRight.TabIndex = 1; // // _FormTestUnpinnedTabAreaTop // this._FormTestUnpinnedTabAreaTop.Dock = System.Windows.Forms.DockStyle.Top; this._FormTestUnpinnedTabAreaTop.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this._FormTestUnpinnedTabAreaTop.Location = new System.Drawing.Point(0, 0); this._FormTestUnpinnedTabAreaTop.Name = "_FormTestUnpinnedTabAreaTop"; this._FormTestUnpinnedTabAreaTop.Owner = this.udmDocker; this._FormTestUnpinnedTabAreaTop.Size = new System.Drawing.Size(813, 0); this._FormTestUnpinnedTabAreaTop.TabIndex = 2; // // _FormTestUnpinnedTabAreaBottom // this._FormTestUnpinnedTabAreaBottom.Dock = System.Windows.Forms.DockStyle.Bottom; this._FormTestUnpinnedTabAreaBottom.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this._FormTestUnpinnedTabAreaBottom.Location = new System.Drawing.Point(0, 507); this._FormTestUnpinnedTabAreaBottom.Name = "_FormTestUnpinnedTabAreaBottom"; this._FormTestUnpinnedTabAreaBottom.Owner = this.udmDocker; this._FormTestUnpinnedTabAreaBottom.Size = new System.Drawing.Size(813, 0); this._FormTestUnpinnedTabAreaBottom.TabIndex = 3; // // _FormTestAutoHideControl // this._FormTestAutoHideControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this._FormTestAutoHideControl.Location = new System.Drawing.Point(0, 0); this._FormTestAutoHideControl.Name = "_FormTestAutoHideControl"; this._FormTestAutoHideControl.Owner = this.udmDocker; this._FormTestAutoHideControl.Size = new System.Drawing.Size(0, 0); this._FormTestAutoHideControl.TabIndex = 4; // // utMDIManager // this.utMDIManager.BorderStyle = Infragistics.Win.UltraWinTabbedMdi.MdiClientBorderStyle.None; this.utMDIManager.ImageSize = new System.Drawing.Size(16, 32); appearance9.ForeColor = System.Drawing.Color.Transparent; appearance9.ImageBackgroundStyle = Infragistics.Win.ImageBackgroundStyle.Centered; this.utMDIManager.TabGroupSettings.CloseButtonAppearance = appearance9; this.utMDIManager.TabGroupSettings.CloseButtonLocation = Infragistics.Win.UltraWinTabs.TabCloseButtonLocation.Tab; this.utMDIManager.TabGroupSettings.ScrollArrowStyle = Infragistics.Win.UltraWinTabs.ScrollArrowStyle.WindowsXP; this.utMDIManager.TabGroupSettings.ScrollButtons = Infragistics.Win.UltraWinTabbedMdi.DefaultableTabScrollButtons.Automatic; this.utMDIManager.TabGroupSettings.ShowTabListButton = Infragistics.Win.DefaultableBoolean.True; this.utMDIManager.TabGroupSettings.TabHeight = 30; this.utMDIManager.TabGroupSettings.TabPadding = new System.Drawing.Size(10, 2); this.utMDIManager.TabNavigationMode = Infragistics.Win.UltraWinTabbedMdi.MdiTabNavigationMode.VisibleOrder; this.utMDIManager.TabSettings.CloseButtonAlignment = Infragistics.Win.UltraWinTabs.TabCloseButtonAlignment.AfterContent; this.utMDIManager.TabSettings.CloseButtonVisibility = Infragistics.Win.UltraWinTabs.TabCloseButtonVisibility.Always; this.utMDIManager.TabSettings.DisplayFormIcon = Infragistics.Win.DefaultableBoolean.True; appearance8.BackColor = System.Drawing.SystemColors.ActiveCaption; appearance8.BackColor2 = System.Drawing.SystemColors.Control; appearance8.BackGradientStyle = Infragistics.Win.GradientStyle.GlassTop20; appearance8.TextHAlignAsString = "Center"; appearance8.TextVAlignAsString = "Middle"; this.utMDIManager.TabSettings.TabAppearance = appearance8; this.utMDIManager.ViewStyle = Infragistics.Win.UltraWinTabbedMdi.ViewStyle.VisualStudio2005; // // groupBox1 // this.groupBox1.Controls.Add(this.button1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Left; this.groupBox1.Location = new System.Drawing.Point(0, 0); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(123, 507); this.groupBox1.TabIndex = 5; this.groupBox1.TabStop = false; this.groupBox1.Text = "groupBox1"; // // button1 // this.button1.Location = new System.Drawing.Point(12, 19); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(105, 23); this.button1.TabIndex = 0; this.button1.Text = "button1"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // FormTest // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(813, 507); this.Controls.Add(this._FormTestAutoHideControl); this.Controls.Add(this.groupBox1); this.Controls.Add(this._FormTestUnpinnedTabAreaTop); this.Controls.Add(this._FormTestUnpinnedTabAreaBottom); this.Controls.Add(this._FormTestUnpinnedTabAreaLeft); this.Controls.Add(this._FormTestUnpinnedTabAreaRight); this.IsMdiContainer = true; this.Name = "FormTest"; this.Text = "FormTest"; this.Controls.SetChildIndex(this._FormTestUnpinnedTabAreaRight, 0); this.Controls.SetChildIndex(this._FormTestUnpinnedTabAreaLeft, 0); this.Controls.SetChildIndex(this._FormTestUnpinnedTabAreaBottom, 0); this.Controls.SetChildIndex(this._FormTestUnpinnedTabAreaTop, 0); this.Controls.SetChildIndex(this.groupBox1, 0); this.Controls.SetChildIndex(this._FormTestAutoHideControl, 0); ((System.ComponentModel.ISupportInitialize)(this.udmDocker)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.utMDIManager)).EndInit(); this.groupBox1.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout();
}
#endregion
private Infragistics.Win.UltraWinDock.UltraDockManager udmDocker; private Infragistics.Win.UltraWinDock.AutoHideControl _FormTestAutoHideControl; private Infragistics.Win.UltraWinDock.UnpinnedTabArea _FormTestUnpinnedTabAreaTop; private Infragistics.Win.UltraWinDock.UnpinnedTabArea _FormTestUnpinnedTabAreaBottom; private Infragistics.Win.UltraWinDock.UnpinnedTabArea _FormTestUnpinnedTabAreaLeft; private Infragistics.Win.UltraWinDock.UnpinnedTabArea _FormTestUnpinnedTabAreaRight; private Infragistics.Win.UltraWinTabbedMdi.UltraTabbedMdiManager utMDIManager; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Button button1; } }
Thank you for the code snippet, I am attempting to creating my own sample but due to the fact that a majority is taken from the designer file within and part of the InitializeComponent method it's difficult to determine how your UI is setup. Please send an solution project that reproduces the behavior.