无法在 C# 中的 tablelayoutpanel 中启用滚动 [英] Unable to enable scroll in tablelayoutpanel in C#

查看:76
本文介绍了无法在 C# 中的 tablelayoutpanel 中启用滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中使用 tablelayout 面板并在其中显示项目.但它不可滚动,我尝试过使用自动滚动、最大尺寸以及其他似乎与滚动相关的所有内容.

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

推荐答案

我不确定你在为那个控件设计什么,但它确实实现了 IScrollable 接口(就像这个名字一样,你可以在对象中查看它浏览器).

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).

这是我的.

// 
        // 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.

这篇关于无法在 C# 中的 tablelayoutpanel 中启用滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆