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
0
votes
2 answers

Why is my TextBox.Width value not accepting the value I'm trying to assign it?

I am trying to evenly space dynamically created controls by giving them a width and height that is a fraction of the width and height of the container control. However, although my functions calculating the dimensions are correct, for some reason…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
0
votes
1 answer

Why don't controls placed in TableLayoutPanels "snap to" their "cells"?

I am dynamically creating a TableLayoutPanel, and then dynamically creating Labels and TextBoxes to put inside it. It would seem logical that I could just assign the number of columns and rows to the…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
0
votes
2 answers

Visual Studio 2010 TableLayoutPanel with Buttons events

I've made in Visual Studio 2010 in designer mode a TableLayoutPanel (for example 8x8 rowsxcolumns), then I've put in each field of this "matrix" a button. Is there any way how to handle the events centrally? I found that TableLayoutPanel have…
user1097772
  • 3,499
  • 15
  • 59
  • 95
-1
votes
1 answer

TablelayoutPanel Slow Redraw

I have 3 Tablelayouts as nested in my Form, The problem I am facing is the slow redraw when I maximize or minimize the form, I read about the Double Buffered property and found questions regarding double buffer of Tablelayoutpanel, but I don't know…
Adil Ahmed
  • 37
  • 4
-1
votes
1 answer

Autosize a Label docked in a TableLayoutPanel when the TLP auto-sizes

Inside a TableLayoutPanel I have are a number of controls and a Label I am using as a visual divider. Minimal working example: The table has a single row and it's set to Autosize to its contents. In Design Mode, if I adjust the height of the large…
Sod Almighty
  • 1,768
  • 1
  • 16
  • 29
-1
votes
1 answer

How to access each field in a Winform TableLayoutPanel in C#

I have a TableLayoutPanel in Winforms, each field contains exactly one label. I now need to get the row/colum and also what is in that field. f.E: I have to check if the lables in the first row all have the same text. How can I do that?
baltermia
  • 1,151
  • 1
  • 11
  • 26
-1
votes
1 answer

winform TableLayoutPanel have some rows, but only one of them is visiable

In a winform project, there is a TableLayoutPanel(TLP), but something is wrong: this TLP has some rows, but onle one row is visiable, it look likes that this TLP has only one row. To make a comparison, I create a new TLP, and this one works fine:…
Yigo Zhou
  • 23
  • 7
-1
votes
2 answers

How to expose ALL properties of a Control in a class derived from Form?

I have class derived from Form and it contains a TableLayoutPanel and in it one Label and one Panel. When I create instance of this Form, all properties and events of controls in design editor are read-only. Is there any way how to expose whole…
-1
votes
1 answer

How to change label fonts when resizing using tablelayoutpanel in C#

I am using tablelayoutpanels in my c# forms to resize the form to suit different screen sizes. The resizing works well but when labels are resized, the text on the label remains the same and may not fit in the label if the screen is smaller. Is…
-1
votes
1 answer

Adding shapes next to other shapes inside a tablelayoutpanel cell c# .NET

I'm quite new in .NET applications and I am trying to create a TableLayoutPanel with a Label and two circles: For doing this, I am creating objects with a label and 2 circles and from above (where I have the TableLayoutPanel) I am trying to add…
Emm
  • 491
  • 5
  • 11
-1
votes
1 answer

how to print tablelayoutpanel with label in windows form

I have a windows form that contains a table, two labels above it and many other components underneath By using the PrintDocument I would like to print the table with its title, and only that without showing the other components. This is my form The…
Sujood
  • 15
  • 5
-1
votes
1 answer

C# removing/adding labels to TableLayoutPanel is too slow

I have a table layout panel with something like 150 rows. each row has 6 columns, and in each column I have a text label. In my program, I want the user to be able during run time to decide which rows he wants to see, so he can select multiple rows,…
TheDaJon
  • 545
  • 2
  • 8
  • 24
-1
votes
1 answer

TableLayoutPanel add Controls not visible

I am trying to dynamically add images to a TableLayoutPanel. The add appears to work, when I look at the contents of the control, the new items appear to have been added. The RowCount = 10, the IEnumerable has 18 items that contain the controls I…
Jane Alford
  • 51
  • 1
  • 2
  • 10
-1
votes
2 answers

Changing background color of a random Label

I have created a 4x4 TableLayoutPanel filled with Labels. I would like to change BackColor of one random Label at a Button_Click. I'm not sure how do I have to do it. Here is what I have so far: public partial class Form1 : Form { Label[,]…
-1
votes
2 answers

How do I get the cell from a table layout panel vb.net

How do I get which cell the user clicked if it has no control in the cell. What I really need is for an image to appear at the cell location when it's clicked but not in it. I imagine it would be similar to this pseudo code myimage.location =…
Mike Smith
  • 45
  • 1
  • 9
1 2 3
32
33