简体   繁体   English

如何增加可滚动标签面板的高度?

[英]How can I increase the height of a scrollable tabpanel?

I am developing a form in Visual Studio which has a TabControl with several TabPage objects on it. 我正在Visual Studio中开发一个具有TabControl的窗体,上面带有几个TabPage对象。 I want one TabPage to fit content that is several times too big vertically for the object in the Visual Studio designer (and indeed would be too big for the monitor). 我希望一个TabPage可以容纳的内容在垂直上对于Visual Studio设计器中的对象来说是几倍大(对于监视器来说确实太大了)。 How can I increase the size of the TabPage beyond that of its parent TabControl or Form , so that I can add the required controls? 如何增加TabPage的大小超出其父TabControlForm ,以便可以添加所需的控件?

When I try to edit the height of the TabPage object in the Properties window, it just undoes my edit. 当我尝试在“属性”窗口中编辑TabPage对象的高度时,它只会撤消我的编辑。

  1. Set the AutoScroll property of the TabPanel to true (thanks @LarsTech). 将TabPanel的AutoScroll属性设置为true(感谢@LarsTech)。
  2. Add a user control to the TabPanel. 将用户控件添加到TabPanel。
  3. Move the user control far down the TabPanel. 将用户控件移到TabPanel的最下方。 You can do this by changing its Location x value. 您可以通过更改其位置x值来实现。

After (3) the scroll bar will change in the editor and the editable area of the tab panel will have increased (3)之后,滚动条将在编辑器中更改,并且选项卡面板的可编辑区域将增加

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM