调整面板大小 C# win 表单
如果你想象一个胜利形式,中间垂直画一条线。左侧有一个图表,当您单击该图表时,某些表单将在右侧的 mdi 类型面板中打开。
我试图弄清楚如何从逻辑上使它看起来像一个正确的应用程序应该但失败了!
整个表单以最大化视图加载。我首先将面板宽度设置为 0,然后当我添加表单时,我检查面板宽度是否小于表单,如果是,则将面板宽度更改为表单宽度。
老实说,这看起来不太好,调整大小会发生奇怪的事情,而且我看到很多灰色。有人有什么想法吗?
If you imagine a win form with a line drawn vertically down the middle. On the left i have a graph, and when you click the graph certain forms open on the right in an mdi type panel.
I am trying to figure out how to logically get this to look like a proper application should but am failing!
The whole form loads in a maximised view. I first set the panel width to 0 then when i add a form i check if the panels width is less than the forms, if it is then change the panels width to that of the forms.
This doesn't look great tho tbh, resizing makes strange things happen and i see a lot of grey. Does anyone have any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在主窗体上使用 SplitContainer。确保其 Dock 属性设置为 Fill
将图表内容放在左侧面板上,将其他内容放在右侧面板上。
Use a SplitContainer on your main form. Ensure it's Dock property is set to Fill
Put your graph stuff on the left panel, and your other stuff on the right side.