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
6
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
  • 971
  • 2
  • 16
  • 27
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,057
  • 14
  • 34
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,275
  • 3
  • 14
  • 22
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
  • 605
  • 2
  • 7
  • 22
5
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…
Ralph
  • 7,746
  • 14
  • 84
  • 190
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
  • 489
  • 1
  • 4
  • 16
5
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
  • 373
  • 4
  • 12
5
votes
2 answers

TableLayoutPanel: Can't get content rows to size correctly

I am using a TableLayoutPanel to split a client area into 3 rows (there is only 1 column). The top and bottom rows are designed to be of fixed height; they will contain a header and a footer which initially each contain a child label control that…
Plastikfan
  • 2,722
  • 5
  • 32
  • 47
5
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
  • 1,055
  • 124
  • 399
  • 759
5
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
  • 102
  • 1
  • 2
  • 6
5
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
  • 1,055
  • 124
  • 399
  • 759
4
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
  • 6,976
  • 9
  • 49
  • 81
4
votes
3 answers

C# change location of controls inside FlowLayoutPanel

I am using flowLayoutPanel to have relative location controls. I would like to change the location of control inside the flowLayoutPanel. when I say location, I dont mean control1 before control2 or something like that - I mean that if I got 2…
Ron
  • 3,677
  • 16
  • 69
  • 117
4
votes
2 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…
4
votes
4 answers

TableLayoutPanel's Control Columns properties

I've noticed that every control added to the TableLayoutPanel is given "Column" and "Row" properties. How can I get access to these properties through code? thanks:)
Idov
  • 4,638
  • 11
  • 60
  • 98
1 2
3
30 31