创建新的或扩展现有的 SplitContainer
实际上,我想我更愿意简单地扩展 winforms 的现有 SplitContainer 控件。
我想要的是从工具箱中添加我自己的 SplitContainer,然后根据需要向其中添加尽可能多的面板。并根据需要删除。
像这样的东西:
如何开始扩展 SplitContainer?
Actually, I think I would prefer to simply extend the existing SplitContainer control for winforms.
What I would love is to add my own SplitContainer from the toolbox, and then add as many more panels to it as needed. And remove as needed.
Something like this:
How would one begin extending the SplitContainer?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为什么不直接使用带有 Dockstyle 和 Splittercontrols 的 Panelcontrols 呢?
如果您确实想编写自己的 Splittcontainer,则必须编写 Control 本身、ParentControlDesigner 和 DesignerActionList。
why don't you just use Panelcontrols with Dockstyle and Splittercontrols?
if you realy want to write your own Splittcontainer you have to write the Control itself, the ParentControlDesigner and a DesignerActionList.
回答老问题合法吗?
我建议使用 TableLayoutPanel,因为它可以根据需要添加更多的列和行。您可以添加面板并设置布局内项目的属性以停靠填充。
使用百分比编辑列,根据内容大小或绝对固定像素自动调整大小
点击TableLayoutPanel上的小箭头打开布局配置
普通窗口
最大化窗口
Is it legal to answer old question?
What I'm suggesting is using TableLayoutPanel since it can be added more column and rows as per needed. And you can add panel and set properties of the item inside the layout to dock fill.
Edit column with percent, autosize based from content size or absolute fixed pixel
Click on tiny arrow on TableLayoutPanel to open the layout configuration
Normal windows
Maximized windows