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
13
votes
3 answers

TableLayoutPanel sizing

I may not be using the right control for what I want. I'm filling a table with controls and I want each column to automatically size to the controls contained within it. For example, a column of textboxes will be wider than a column of checkboxes. I…
GeoffM
  • 1,603
  • 5
  • 22
  • 34
13
votes
7 answers

How to avoid flickering in TableLayoutPanel in c#.net

I am using a TableLayoutPanel for attendance marking purposes. I have added controls (a Panel and a Label) inside of this TableLayoutPanel and created events for them. In some conditions I have cleared all of the controls and proceeded to bind the…
Vyasdev Meledath
  • 8,926
  • 20
  • 48
  • 68
12
votes
1 answer

Flowlayout and Tablelayout in windows form

What is the difference between Flowlayout and Tablelayout in windows form ? I know i can google it, but i am bit short on time. my requirement is too , that when the form is resized. Resizing for forms should not mess up my align for the control,…
Gainster
  • 5,481
  • 19
  • 61
  • 90
11
votes
2 answers

How deep does Controls.Clear() clean up?

I'm using a TableLayoutPanel which is dynamically filled with other TablelayoutPanels. Now I'm wondering what happens when I call TableLayoutPanel.Controls.Clear on the dynamically filled TableLayoutPanel. Obviously, all the sub-layouts are removed,…
Xaser
  • 2,066
  • 2
  • 22
  • 45
11
votes
2 answers

Docked controls placed within TableLayout do not automatically size smaller than their creation size

This issue is better demonstrated than explained, so I've set up a git repo with Visual Studio 2010 project that be used to see the issue in action. I have a project where I've added a ComboBox control (comboField) to a TableLayout control…
Dan Stevens
  • 6,392
  • 10
  • 49
  • 68
10
votes
3 answers

D Forms Library TableLayoutPanel?

Every time I try to use the D Forms Library, I run across the fact that it has no TableLayoutPanel -- which makes it practically impossible for me to make a good GUI. Is there any TableLayoutPanel implementation out there for DFL? How do people…
user541686
  • 205,094
  • 128
  • 528
  • 886
10
votes
2 answers

Fix row height of every row in TableLayoutPanel

I'm working on Windows c#. Firstly, the things those can not be change as my need are following: The Size of TableLayoutPanel is fixed. The Total # of columns are fixed. Now, I want to set a fix height for all rows but as increasing the rows, if…
iVad
  • 563
  • 2
  • 4
  • 13
9
votes
3 answers

Resizable table layout panel in c#

I find the table layout panel in c# (.net 2.0) to be very primitive. I wanted to allow my users to resize the columns in a table layout panel but there are no ready made options to do so. Is there a way atleast to find out whether the cursor is…
sudarsanyes
  • 3,156
  • 8
  • 42
  • 52
9
votes
1 answer

TableLayoutPanel column widths at runtime: strange behavior or bug

I have a tableLayoutPanel with either 5 or 7 columns. Users can click "show/hide weekend" button to switch from 5 to 7 days. The problem : When you start with 5 days, then press the 5/7 button, the 7 columns are NOT spaced evenly ... column 6 is…
Run CMD
  • 2,937
  • 3
  • 36
  • 61
9
votes
2 answers

C# tablelayoutpanel unable to remove padding/margin

Basically I'm facing a problem with removing the padding/margin between controls in a tablelayoutpanel. I've set the tablelayoutpanel margin and padding to 0. Cellborderstyle is none. Added controls are all set to 0 for margin and padding. Yet that…
Tim
  • 306
  • 2
  • 10
9
votes
5 answers

TableLayoutPanel Last Row Size Too Big

My application uses a TableLayoutPanel that resides within a TabPage. If the number of items I add is relatively small (i.e. it doesn't "fill up" the whole tab page) then the last row's height is stretched. Here is a screenshot of what's…
Jan Tacci
  • 3,131
  • 16
  • 63
  • 83
8
votes
2 answers

TableLayoutPanel responds very slowly to events

In my application I really needed to place a lot of controls (label, textbox, domainupdown) in a nice order. So I went ahead and used some nested TableLayoutPanel. The problem now is, this form responds very slow to most of events (resize, maximize,…
Dumbo
  • 13,555
  • 54
  • 184
  • 288
8
votes
3 answers

Is there a way to remove all controls from a row in TableLayoutPanel?

I generate controls for a TableLayoutPanel dynamically. I have a delete button in each row. When I click that, that row has to be removed. Dim removeBtn As New Button AddHandler removeBtn.Click, AddressOf DeleteRow …
Raj
  • 22,346
  • 14
  • 99
  • 142
8
votes
4 answers

.Net TableLayoutPanel – Clearing Controls is Very Slow

This is really simple. I have a TableLayoutPanel that is populated with controls (just Labels, Buttons, and some Panels with buttons) based on a database query. When the data needs to be refreshed, I use TableLayoutPanel.Controls.Clear().…
ErikE
  • 48,881
  • 23
  • 151
  • 196
8
votes
4 answers

How do I determine the cell being clicked on in a TableLayoutPanel?

I have a TableLayoutPanel and I want to add a control to the cell that I click on. The problem is that I can't determine the cell that I click on at run time. How do I determine the cell being clicked on?
Ayman Sharaf
  • 889
  • 2
  • 10
  • 18
1
2
3
32 33