最大化时,MDI 父级中的面板与子级重叠
我正在使用 VS2010 和 C# 4.0 编写一个 Windows 应用程序。我有一个 MDI 父窗体,我需要在其底部有一个“设置面板”。为此,我使用了无边框表单。但是现在,当应用程序运行时,当我最大化子窗体时,它会与设置面板重叠。我怎样才能避免这种情况?我的设置面板应该始终可见,并且不会与其他任何内容重叠。
I'm writing a windows application using VS2010 and C# 4.0. I have a MDI Parent form, and I need to have a "settings panel" at the bottom of it. I used a borderless form for this purpose. But now while the application is running, when I maximize a child form it overlaps the settings panel. How can I avoid that? My settings panel should always be visible and never overlapped by anything else.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不要为此使用
Form
。您应该使用一个简单的Panel
。请按照以下简单步骤操作:IsMdiContainer
设置为false
。Panel
添加到您的主Form
并将其停靠在底部(或您喜欢的任何选项,左侧、右侧等)。该面板将是您的设置面板。IsMdiContainer
设置回true
。步骤 3 和 4 可以按任意顺序完成。
首先将
IsMdiContainer
设置为false
的原因是为了确保您可以将Panel
停靠在Form< 的客户端空间内/code> 而不是
MdiContainer
控件的内部客户端空间(当您将IsMdiContainer
设置为true
时,设计器会自动添加它对接设置为填充
)。如果您要将其停靠在MdiContainer
内,则Panel
将被您要打开的任何 MdiChild 隐藏。请注意,您无法直接与设计器中的MdiContainer
控件交互。Do not use a
Form
for this. You should be using a simplePanel
. Follow these simple steps:IsMdiContainer
tofalse
.Panel
to your mainForm
and dock it to the bottom (or whatever option you prefer, left, right, etc.). This pannel will be your settings panel.IsMdiContainer
back totrue
.Steps 3 and 4 can be done in any order.
The reason to first set the
IsMdiContainer
tofalse
is to make sure you can dock yourPanel
inside the client space of theForm
and not to inside client space of theMdiContainer
control (which is automatically added by the designer when you setIsMdiContainer
totrue
with it's docking set toFill
). If you were to dock it inside theMdiContainer
thePanel
would be hidden by any MdiChild you were to open. Note that you can not interact directly with theMdiContainer
control in the designer.