Kyle Orton
Kyle Orton

Reputation: 71

adding controls to tableLayoutPanel

I was wondering if it was possible to add more than one item into single tableLayoutPanel? Currently, I can only insert ONE item, it won't accept anything else. I would like to have for example a richtextBox with label and button inside it. Is is possible? Thanks! I'm not asking for code, I just need to know if it's possible to manually drag and drop these items into single cell in tableLayoutPanel.

Upvotes: 2

Views: 4633

Answers (3)

user13101014
user13101014

Reputation:

Add a container such as a GroupBox or Panel, and set it to fill all available space in the table cell, and that could override the TableLayoutPanel's "one per box" rule so you should be able to add as many controls as you wish

Upvotes: 0

Borik
Borik

Reputation: 438

You Can also add a Panel Control and then add all other stuff to the Panal

Upvotes: 0

Mark Hall
Mark Hall

Reputation: 54562

It appears you are only allowed one control per cell, if that is what you mean. You can always add a container control such as a panel with it's Dock property set to Fill you can then add your additional controls to it. Or add another tablePanelLayout Control to the Cell and set the row / columns how you need and then add your controls to that. Or as LarTech mentioned in the comments a UserControl would work also.

Upvotes: 5

Related Questions