Winforms:带有对接的FlowLayoutPanel [英] Winforms: FlowLayoutPanel with Docking

查看:119
本文介绍了Winforms:带有对接的FlowLayoutPanel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是在Winforms中.我正在创建一个用户控件,它基本上是一个由其他用户控件填充的FlowlayoutControl.我需要添加的每个控件都停靠在上一个控件的顶部(从左到右).不幸的是,它看起来像flowlayoutcontrol忽略了任何停靠属性.有什么方法可以将控件停靠在里面吗?我需要它从左到右填充项目,但项目应像列表视图一样进行布局.实际上,我无法提供任何代码,因为这实际上是要弄清楚采用哪种方法的问题.

This is in winforms. I am creating a User control that is basically a FlowlayoutControl filled with other User Controls. I need each of the controls added to be docked to the top of the previous (from left to right). Unfortunately it looks like the flowlayoutcontrol ignores any of the docking properties. Is there any way to dock the controls inside there? I need it to fill the item from left to right, but the items should be laid out like a list view. Theres really no code i can provide due to the fact that its a matter of figuring out what approach to take.

推荐答案

FlowLayoutPanel.FlowDirection属性指示FlowLayoutPanel控件的流向.

FlowLayoutPanel.FlowDirection Property indicates the flow direction of the FlowLayoutPanel control.

FlowLayoutPanel.WrapContents属性指示FlowLayoutPanel控件是应该包装其内容还是剪切内容.

FlowLayoutPanel.WrapContents Property indicates whether the FlowLayoutPanel control should wrap its contents or let the contents be clipped.

这篇关于Winforms:带有对接的FlowLayoutPanel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆