简体   繁体   English

如何在 TableLayoutPanel 的特定单元格中放置多个控件

[英]How i can place multiple controls in a particullar cell of TableLayoutPanel

I'm using a TableLayoutPanel control and in my scenario I have to place two controls inside of one particular cell, is that possible?我正在使用 TableLayoutPanel 控件,在我的场景中,我必须在一个特定单元格内放置两个控件,这可能吗? If so, please elaborate.如果有,请详细说明。

您应该在该单元格内使用面板或任何其他内容控件,然后您就可以在其中添加许多控件。

Put a tablelayout panel in the cell and give it two columns and one row.在单元格中放置一个表格布局面板,并为其指定两列和一行。 There's your two "cells".这是你的两个“细胞”。

在单元格内放置一个面板,在该面板控件中,您可以放置​​任意数量的控件

Try something like this:尝试这样的事情:

1) Create user control and place all control you want on it and than add new control in the cell 1)创建用户控件并将您想要的所有控件放在上面,然后在单元格中添加新控件

2) Put controls in the panel then put panel in the cell 2)将控件放在面板中,然后将面板放在单元格中

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将TableLayoutPanel中的控件移动到另一个单元格并将其还原回C#中? - How to move controls in TableLayoutPanel to another cell and restore it back in C#? 如何以编程方式设置动态创建的控件的列和行属性以嵌入TableLayoutPanel? - How can I programmatically set the Column and Row properties of controls that are dynamically created to embed within a TableLayoutPanel? TableLayoutPanel:如何通过动态添加的控件使用 Tab 键导航? - TableLayoutPanel: How can i navigate with tab key through dynamically added controls? 如何确定在TableLayoutPanel中单击的单元格? - How do I determine the cell being clicked on in a TableLayoutPanel? 如何处理TableLayoutPanel单元格中的MouseDoubleClick? - How to handle a MouseDoubleClick in a cell of a TableLayoutPanel? 如何在动态创建的tablelayoutpanel上拖放控件 - How to drag and drop controls on dynamically created tablelayoutpanel "如何使多个控件保持焦点?" - How can I keep multiple controls in focus? Mono WinForms TableLayoutPanel单元相对于表单锁定在适当的位置 - Mono WinForms TableLayoutPanel cell locked in place relative to the form 如何将Button保持在TableLayoutPanel下方的相同位置? - How can I keep Buttons at the same position below a TableLayoutPanel? winforms如何在TableLayoutPanel中绘制(fillRectangle)一个单元格? - winforms how to paint (fillRectangle) a single cell in TableLayoutPanel?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM