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.

495 questions
7
votes
1 answer

TableLayoutPanel and StatusTrip toolbar overlapping

I have a winforms vb.net app. In this winform I have placed two components: TableLayoutPanel StatusStrip toolbar I am trying to put StatusStrip toolbar at the bottom of the winforms and TableLayoutPanel to fit all the rest of the screen, so I set…
Willy
  • 9,848
  • 22
  • 141
  • 284
7
votes
3 answers

How to make TableLayoutPanel with resizable cells like using Splitter

Got TableLayoutPanel with 1 column and N rows needed to cells be resizable with somthing like Splitter component between cells. without using SplitContainer. May be any other idea without TableLayoutPanel?
E.Monogarov
  • 460
  • 8
  • 17
7
votes
3 answers

Automatically resize TableLayoutPanel row when window is resized

I have a simple 1x3 TableLayoutPanel. I want to achieve a very simple thing: When the window is resized, resize the middle row and keep top and bottom ones the same. I tried doing the logical thing, which is setting rigid top and bottom row sizes…
John NoCookies
  • 1,041
  • 3
  • 17
  • 28
6
votes
4 answers

Hide a row in TableLayout

I have a table layout that contains three rows and one column: What I want is to hide the second row before the progress completes, like this: On the internet, I found two things: Delete the row - I don't want to delete the row, just temporarily…
Tomáš Zato
  • 50,171
  • 52
  • 268
  • 778
6
votes
2 answers

How to set cell color in TableLayoutPanel dynamically?

I need to write a function which will set the color in TableLayoutPanel cells depending on some condition during running the program. TableLayoutPanel is divided by 16x16. There is some condition at the start of the program. If the condition is true…
Sergey
  • 103
  • 1
  • 2
  • 9
6
votes
2 answers

How to force a WinForms control to fill up FlowLayoutPanel that's in a multi-column-spanning cell in a TableLayoutPanel?

I have a TextBox that's in a FlowLayoutPanel that's inside a cell of a TableLayoutPanel. The FlowLayoutPanel spans 5 columns of the TableLayoutPanel and fills up the entire width of the 5 columns. However, the TextBox doesn't fill up the entire…
Yawar
  • 11,272
  • 4
  • 48
  • 80
6
votes
1 answer

How to let table layout fit 100% of the container with

How can I give a tablelayoutpanel a width of 100% so it will fill the parent container and also resizes the table when resizing the window. My form looks like this now: I want to add rows dynamically so the result will be some like this: It would…
botenvouwer
  • 4,334
  • 9
  • 46
  • 75
6
votes
2 answers

Is SuspendLayout/ResumeLayout worthless or am I going about it wrong?

I have two tab pages hosting TableLayoutPanels that I dynamically populate with labels and textboxes. The first one gets 96 labels and 96 textboxes, and its flicker is acceptable/tolerable, so I didn't bother to add a SuspendLayout/ResumeLayout…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
6
votes
2 answers

ListBox AutoSizes by item height

I use TableLayoutPanel for all my elements in a form. I use Dock Fill to autosize a TextBox and a ListBox. TextBox fits perfectly in a cell of the TableLayoutPanel but not a ListBox. It autosizes by item height. How to delete this gap between the…
Mo3r
  • 112
  • 1
  • 2
  • 6
6
votes
2 answers

Programmatically assigning Margin and/or Padding to a Label

In trying to get some labels in a TableLayoutPanel to move from the top left of their cells to the center of the cells, I'm trying to experiment with adding padding and/or margins. However, nothing I've tried works. Here's the code I've tried and…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
5
votes
3 answers

How can I make all columns in a TableLayoutPanel autosize to exactly the same width?

I'm trying to create a fairly extensive UserControl incorporating square controls into the design, and allowing resizing. Because the design calls for squares, I need all the columns in my TableLayoutPanels to be the same width, so that the…
Frosty840
  • 7,965
  • 12
  • 50
  • 86
5
votes
1 answer

How to add rows into middle of a TableLayoutPanel

I have a TableLayoutPanel with 3 columns and 1 row: (Remove button, User Control, Add button) I want the Add button to add a new row similar to the above below the clicked button: e.g: BEFORE: (Remove button 1, User Control 2, Add button 1) (Remove…
Eldad
  • 1,067
  • 16
  • 36
5
votes
7 answers

Dynamically Populated TableLayoutPanel Performance Degredation

I have a user control that contains a 2-column TableLayoutPanel and accepts commands to dynamically add rows to display details of an item selected in a separate control. So, the user will select a row in the other control (a DataGridView), and in…
Cory McCarty
  • 1,375
  • 4
  • 15
  • 23
5
votes
1 answer

Center multiple rows of controls in a FlowLayoutPanel

I'm trying to make a panel that would host dynamically added controls. There are two caveats: There are going to be a lot of controls, so the panel should wrap the elements into new rows as it reaches its width limits and scroll vertically.…
JagdCrab
  • 635
  • 2
  • 9
  • 22
5
votes
0 answers

C# tableLayoutPanel scroll everything except top row

I am using winforms with C# and looking at the TableLayoutPanel Is it possible to have a scroll bar on a large table, but not to have the top row scroll? It would be similar to how the "freeze panes" option works in Excel. I only want to freeze the…
Gevo12321
  • 549
  • 1
  • 5
  • 19
1 2
3
32 33