Questions tagged [tablelayoutpanel]

A Winforms control that allows the dynamic addition of components which are arranged in a grid pattern using columns and rows.

The dynamic nature of the TableLayoutPanel allows columns and rows to be added at run time. This also means that the TableLayoutPanel will resize if the parent control's size changes.

462 questions
85
votes
8 answers

Winforms TableLayoutPanel adding rows programmatically

I've been fighting with this for a while, and have found that a number of other people struggle with the TableLayoutPanel (.net 2.0 Winforms) as well. Problem I am attempting to take a 'blank' tablelayoutpanel, which has 10 columns defined, then at…
Ash
  • 4,741
  • 6
  • 32
  • 48
43
votes
4 answers

Add Row Dynamically in TableLayoutPanel

I want to add these entries dynamically row by row in TableLayoutPanel in Windows Form in c# How can I do that?
ΔȺȾΔ
  • 21,571
  • 10
  • 52
  • 80
34
votes
1 answer

Adding controls to TableLayoutPanel dynamically during runtime

I have a TableLayoutPanel starting with two columns and 0 rows. What I need to do is, dynamically adding a row and filling both of the columns with different controls (it will be panels). In Form1 I am creating the TableLayout this…
Marek Buchtela
  • 923
  • 3
  • 17
  • 35
30
votes
4 answers

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? If so, please elaborate.
Dev Kashyap
  • 355
  • 1
  • 4
  • 6
29
votes
7 answers

How to merge two cells in Table Layout

I have two rows and two columns. I want last column of both cells merge into one. Due to requirement I do not use other design options means two tablelayouts in which first table layout has two rows.I am use Winforms in C#. | |…
Abhijit Shelar
  • 955
  • 6
  • 20
  • 41
29
votes
1 answer

Remove spacing between cells in tablelayoutpanel in Windows form?

I've programmatically created a class, Map, that inherits from the TableLayoutPanel class. The Map class adds Tile objects (children of Panel) that each have a background image. Everything works except that there is a noticeable space between each…
Zooey
  • 411
  • 1
  • 4
  • 10
25
votes
3 answers

Table layout panel scroll bar

given a table layout panel with 2 columns and many rows, how can i attatch a scroll bar to it as sometimes it grows much greater than the size of the form . Thank you
tom
  • 4,571
  • 10
  • 34
  • 38
24
votes
5 answers

Removing a specific Row in TableLayoutPanel

I have TableLayoutPanel that I programatically add Rows to. The User basically choses a Property and that is then displayed in the table along with some controls. I think I have a general understanding problem here and I will try to explain it. One…
sebsn
  • 255
  • 1
  • 2
  • 6
22
votes
2 answers

How to set a columnspan in tableLayoutPanel

I am using a tableLayoutPanel which consist of two rows. In first row I want two columns, and in second row I only need one column. How can I do this?
Nighil
  • 3,849
  • 6
  • 25
  • 50
18
votes
3 answers

Draw borders around some cells in a tablelayoutpanel

Don't ask why but I have the requirement to draw a border around certain cells in a TableLayoutPanel. For example, for simplicity, lets say I have a 1 row, 5 column TableLayoutPanel. Each cell has a button in it. I would like to draw a box around…
Vance Smith
  • 2,105
  • 5
  • 29
  • 32
18
votes
2 answers

Change row/column span programmatically (tablelayoutpanel)

I have a tablelayoutpanel. 2x2 - 2 columns 2 rows. For example, I added a button button1 in a 1 row, second column. button1 has a dock property set to Fill. VS Designer allows to set column/row span properties of button1. I want an availability to…
Александр Д.
  • 1,019
  • 4
  • 12
  • 21
18
votes
2 answers

Get height and width of TableLayoutPanel cell in Windows Forms

Using a TableLayoutPanel in Windows Forms. I am using RowStyles and ColumnStyles with SizeType as AutoSize and Percent respectively. I need to find out the absolute height and width of a cell in which a particular control is…
Brij
  • 8,483
  • 15
  • 65
  • 107
17
votes
8 answers

Hide and show a cell of the TableLayoutPanel

My tablelayout panel has one column and three rows. (one docked to Fill panel in each cell.) Now I would like to be able to hide/show the rows . I want only one row to be visible at any time ( based on a user selection of some radio buttons) and I…
Bohn
  • 24,195
  • 54
  • 155
  • 240
14
votes
6 answers

Vertically aligning controls in a TableLayoutPanel

Is there any way to have textual content of controls on a TableLayoutPanel align themselves properly? I've got labels in column 0, and textboxes (or occasionally ComboBox or NumericUpDown controls) in column 1, but the text in the label is usually a…
Flynn1179
  • 11,557
  • 6
  • 35
  • 70
14
votes
5 answers

TableLayoutPanel displays vertical scroll

I have TableLayoutPanel for dynamic creation of controls with AutoScroll = true. It's work fine when I add new controls. But when I remove and all controls are visible, vertical scroll is visible. Some screenshots here: Expected/correct scroll…
1
2 3
30 31