private void InitializeComponent2() { TableLayoutPanel tableLayoutPanel1 = new TableLayoutPanel(); mainView = new SimpleScrollableControlMainView(this); horizontalScrollBar = new HorizontalScrollBarView(this); verticalScrollBar = new VerticalScrollBarView(this); smallCornerView = new ScrollableControlSmallCornerView(); tableLayoutPanel1.SuspendLayout(); SuspendLayout(); tableLayoutPanel1.ColumnCount = 2; tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, CompoundScrollableControl.scrollBarWidth)); mainControl = mainView.CreateControl(); tableLayoutPanel1.Controls.Add(mainControl, 0, 0); tableLayoutPanel1.Controls.Add(horizontalScrollBar.CreateControl(), 0, 1); tableLayoutPanel1.Controls.Add(verticalScrollBar.CreateControl(), 1, 0); tableLayoutPanel1.Controls.Add(smallCornerView.CreateControl(), 1, 1); tableLayoutPanel1.Dock = DockStyle.Fill; tableLayoutPanel1.Location = new Point(0, 0); tableLayoutPanel1.Margin = new Padding(0); tableLayoutPanel1.Name = "tableLayoutPanel1"; tableLayoutPanel1.RowCount = 2; tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, CompoundScrollableControl.scrollBarWidth)); tableLayoutPanel1.Size = new Size(409, 390); tableLayoutPanel1.TabIndex = 0; AutoScaleDimensions = new SizeF(6F, 13F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(tableLayoutPanel1); Name = "ScrollableControl2"; Size = new Size(409, 390); tableLayoutPanel1.ResumeLayout(false); ResumeLayout(false); }