寻找有关 Windows Forms .Net 调整大小组件的建议
默认情况下,Windows 窗体调整大小逻辑是有限的——锚定和对接。 过去,我在需要时推出了自己的自定义调整大小逻辑。 但是,我正在开始一个项目,该项目具有大量非常复杂的表单,必须自动调整大小以适应不同的分辨率。 我不想在调整逻辑大小上投入大量时间。
我看到有些销售组件的公司宣传统一调整尺寸。 有人对调整组件大小有任何经验/有什么建议吗?
By default windows forms resize logic is limited--anchoring and docking. In the past I've rolled my own custom resize logic when required. However, I'm getting started on a project that has a large number of very complex forms that must auto-resize to different resolutions. I don't care to invest a ton of time in resize logic.
I see that there are companies selling components that advertise uniform resizing. Does anyone have any experience with any resizing components/have any recommendations?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您看过 TableLayoutPanel 吗? 它应该允许您拥有不同的“单元格”,每个单元格包含一个 UI 元素,并且所有单元格以相同的速率增长。
Have you looked at the TableLayoutPanel? It should allow you have different "cells" each containing a single UI element and have all the cells grow at the same rate.
我找到了一个组件 .net resize< /a> 这似乎工作得很好。 只需将其放在表单上,表单就可以完全调整大小。 不幸的是,每个座位 178 美元,有点贵。
I found a component .net resize which seems to work really well. Simply drop it on the form and it makes the form completely resizable. Unfortunately, at $178 a seat it's a bit on the expensive side.
是的,TableLayoutPanel 和在表单上将 AutoSize 设置为 True 的功能非常强大,但是需要一些时间来了解发生了什么,但是如果您有几个小时来习惯它,您可以创建一些很棒的对话框,而无需做很多工作。
Aye, TableLayoutPanel and setting AutoSize to True on the form can be quite powerful, but it takes a bit to understand what is going on, but if you have a few hours to get used to it, you can make some awesome dialogs without having to do a lot of work.
如果您不想购买任何东西并且 TableLayoutPanel 不足以满足您的需求(这意味着您有一些非常特殊的需求),您始终可以自己创建一个组件来管理调整大小,这可以适用于您的所有表单。 (有点像上面描述的 .net resize)
您还可以计算创建与 .net resize 执行相同工作的内容所需的时间。 如果时间与成本看起来相似,那么根据您的截止日期,您可能更愿意自己编码,以便拥有完全的控制权。
If you don't want to buy anything and the TableLayoutPanel is not good enough for your needs (which would mean you have some very special needs), you could always create a component yourself to manage the resize, which could work for all your forms. (a bit like .net resize you described above)
You could also take into calculation the time it would require you to create something that does the same work as .net resize. If the time versus cost seems similar, depending on your deadlines, you might prefer to code it yourself so you have full control.