简体   繁体   English

如何使Winforms控件随窗口调整大小?

[英]How do I make the winforms controls resize with the window?

So, when I have a form, and I resize it, the controls just get hidden "behind" the form, i guess. 因此,我猜想,当我有一个表单并调整其大小时,控件只会隐藏在表单“后面”。 I want the controls to resize with the form. 我希望控件使用表单调整大小。 How can I do this? 我怎样才能做到这一点?

You can use Anchors and Docks . 您可以使用船坞 In addition, controls like a TableLayoutPanel can also support you when creating a layout. 另外,在创建布局时,诸如TableLayoutPanel之类的控件也可以为您提供支持。

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

相关问题 如何使用 window 在 Windows 表单中进行多个控件自动调整大小? - How do I make multiple controls in a Windows Form automatically resize with the window? 为什么WinForms设计器中的控件会自行调整大小? - Why do controls in the WinForms designer resize on their own? 当窗口在.net中最大化时,如何调整控件(面板,网格)本身的大小 - how can i make resize to controls(Panel ,Grid) itself when window is maximize in .net 在.NET WinForms中,如何将控件放在IE8,WMP,Win Explorer等窗口边框中? - In .NET WinForms, how do I put controls in the window border like IE8, WMP, Win Explorer etc.? 使两个窗体控件均匀地调整窗口大小 - Make two form controls resize with window evenly 如何使WPF窗口看起来像Winforms窗口? - How can I make a WPF window look like a Winforms window? Winforms控件和“通用”事件处理程序。 我怎样才能做到这一点? - Winforms controls and “generic” events handlers. How can I do this? 如何在不调整大小的情况下居中控制? (.net Winforms) - How do I center controls without resizing them? (.net Winforms) 如何在.Net WinForms控件上绘制自定义边框 - How do I paint custom borders on .Net WinForms controls 如何在 winforms 应用程序中处理 Panels 和 tabPages 中的所有控件 - How do I dispose all of the controls in Panels and tabPages in winforms app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM