0

I am using a tablelayout panel in my project and displaying items in it . but it is not scrollable , i have tried with autoscroll, maximum size and everything else that seems related to scrolling .

Any kind of help will be appreciated , many thanks , plz help

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • hello, can you please edit your code because tablelayoutpanel is a scrollable control and propertie AutoScroll setted to true works – Hassan Boutougha Aug 07 '12 at 05:57
  • Try this : https://stackoverflow.com/questions/15620454/tablelayoutpanel-displays-vertical-scroll/25601129#25601129 – Bioukh Nov 27 '19 at 19:18

2 Answers2

1

In order to auto scroll show any kind of scroll bar its parent control must be smaller than the TableLayoutPanel itself. Check you parent size and other properties, such as autosize, dock and autosizemode

Luis Filipe
  • 8,488
  • 7
  • 48
  • 76
1

I'm not sure what you're designing for that control, but it really implemente the interface IScrollable (just like this name, you could view it in object browser).

Here is mine.

// 
        // tableLayoutPanel1
        // 
        this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
        | System.Windows.Forms.AnchorStyles.Left)));
        this.tableLayoutPanel1.AutoScroll = true;
        this.tableLayoutPanel1.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
        this.tableLayoutPanel1.ColumnCount = 2;
        this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
        this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
        this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 12);
        this.tableLayoutPanel1.Name = "tableLayoutPanel1";
        this.tableLayoutPanel1.RowCount = 1;
        this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
        this.tableLayoutPanel1.Size = new System.Drawing.Size(686, 515);
        this.tableLayoutPanel1.TabIndex = 0;
        // 

Hope this could help you, I use it just now.

Itachi
  • 5,777
  • 2
  • 37
  • 69