C# Flow Layout Panel Line break or New line

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 18:09:42

问题


I am adding some controls to Flow layout panel. In between some controls I need a line break. How can I achieve this please. Thanks


回答1:


You need a custom control which resizes itself to the end of a flow panel, and has a zero height / width, depending upon the flow direction of a flow panel




回答2:


After adding the last control before the break, call flow.SetFlowBreak(lastControl, true).

Note: lastControl is the control that you want set new line after that.




回答3:


The best answer is by far the comment made by Brian Gillespie:

Set FlowBreak from the VS2010 GUI: Scroll to the bottom of the PropertyPanel for the control before the line break, and set FlowBreak to True.



来源:https://stackoverflow.com/questions/5054622/c-sharp-flow-layout-panel-line-break-or-new-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!