Questions tagged [flowlayoutpanel]

Represents a winforms container that dynamically lays out its contents horizontally or vertically.

Represents a winforms container that dynamically lays out its contents horizontally or vertically very similar to the Java flowlayout containers.

To add controls, you use the Controls property:

flowLayout1.Controls.Add(ctrl); // add a ctrl to the collection

To adjust spacing between the controls, use the control's Margin property:

ctrl.Margin = new Padding(10);
flowLayout1.Controls.Add(ctrl);

For further information: http://msdn.microsoft.com/en-us/library/system.windows.forms.flowlayoutpanel.aspx

334 questions
3
votes
1 answer

New line in FlowLayoutPanel

I am using following code to generate controls dynamically inside a FlowLayoutPanel (win forms - c#). I want to add line break after completion of inner foreach. var fullText = textBox1.Text; List listPoints =…
Isuru
  • 530
  • 3
  • 9
  • 25
3
votes
3 answers

Check if flowLayoutPanel is empty in c#

I want to make an error label come up when my flowLayoutPanel is empty, but i don't know how to check that the flowLayoutPanel is empty. This is my current code: private void flowLayoutPanel1_ControlRemoved(object sender, ControlEventArgs e) …
Chris Bacon
  • 995
  • 8
  • 30
  • 42
3
votes
2 answers

Scroll a control to the visible top of a Flowlayoutpanel

I have implemented a flowlayoutpanel to show images as kind of lightbox. I need to add new images into the FLP not at the end, but as leading images. For this, I created a List with the new Images and into this list I added the images of the FLP…
Alex Ramisch
  • 33
  • 1
  • 5
3
votes
1 answer

Multi-Row Autosize Scrollable FlowLayoutPanel

I have 50 images. I need to add these images in FlowLayoutPanel, 30 images for 1st row after that wrap row and 20 images in second row. So I also need to show scrollbars on control. I am dividing video into frames(images) and shown in…
Vishvadeep singh
  • 1,624
  • 1
  • 19
  • 31
3
votes
1 answer

FlowLayoutPanel shows horizontal scroll bar with inner panel's width being the same as client size width

I'm experiencing a problem with FlowLayoutPanel while its children being resized on FlowLayoutPanel's ClientSizeChanged event. I'm trying to make the children resize horizontally when the FlowLayoutPanel resizes. The problem is that even though the…
Ramtin Soltani
  • 2,650
  • 3
  • 24
  • 45
3
votes
1 answer

Scroll Container in C# winform

I'm working on windows form project which has many controls on the form but I'm looking for a way that decrease my form, while seeing all of the controls by scroll up/down. I am trying to use FlowLayoutPanel but it aligns horizontally or…
Sasan007
  • 75
  • 1
  • 2
  • 6
3
votes
1 answer

Rearrange CustomControl in a flowLayoutPanel

I have multiple custom controls (it's a button with a label underneath) added to a FLP. I am trying to be able to rearrange the added custom controls by dragging one over another. With some help made it to work with simple buttons but is not working…
alex Alex
  • 373
  • 6
  • 25
3
votes
1 answer

Control.AddRange(...) is slow

Project: I have a parent panel which holds a ComboBox and FlowLayoutPanel. The FlowLayoutPanel holds a variable number of child panels (a custom control that inherits from UserControl). Each child panel contains some labels, two ComboBoxes, a…
ErikusMaximus
  • 1,150
  • 3
  • 13
  • 28
3
votes
1 answer

FlowLayoutPanel inside a tabControl

I have a tabControl and a flowLayoutPanel inside each tab.. When I drag and drop a file onto a tab it creates a button with the icon of the file dropped. But i have the option to create more tabs and I want to be able to drag files into the selected…
alex Alex
  • 373
  • 6
  • 25
3
votes
2 answers

Unexpected index change when adding a control to a FlowLayoutPanel

I have a place in my code where I am dynamically adding controls to a Top-Down arranged FlowLayoutPanel. I need the controls to appear in a certain order so what I am doing everytime is clearing the FlowLayoutPanel.Controls collection and then…
TJ_Fischer
  • 15,881
  • 2
  • 23
  • 20
3
votes
3 answers

Select UserControl from FlowLayoutPanel

I have set up UserControls in a FlowPanelLayout with the help in this question: For Each DataTable Add UserControl to FlowLayoutPanel I am now trying to implement a click event which allows me to put a border around the UserControl that has been…
hshah
  • 842
  • 4
  • 14
  • 35
3
votes
1 answer

How to maximize the efficiency of the FlowLayoutPanel?

The basic goal is to create a Business Card for each contact and put that card in a FlowLayoutPanel. The card itself is comprised of about 10 labels and 3 comboboboxes. It doesn't take too many business cards to cause initial population of the…
user1646737
  • 169
  • 7
2
votes
0 answers

C# issue with the custom Panels inside the FlowLayoutPanel

Please let me know if you need more details. I'm creating a thumbnail view for media (images, videos, folders) sorta like the windows view for files. I'm using a FlowLayoutPanel to hold the thumbnails. And a Panel, PictureBox and Label for each…
Martyn
  • 46
  • 4
2
votes
2 answers

Hiding the Scrollbar while allowing scrolling with the Mouse Wheel in a FlowLayoutPanel

I'm attempting to create a dynamic panel where I can add controls to and scroll when the controls are off the panel's height, while also hiding the scrollbars. I'm using a FlowLayoutPanel and I'm constantly adding custom panels to it, with their…
yeho
  • 132
  • 2
  • 13
2
votes
1 answer

argument out of range parameter name index

since i have the code of the auto generated text box Insert data from auto generated textbox to SQL Server database i am try to write a code for ensuring of the auto generated text box in FlowLayoutPanel1 contain data the auto generated text box…
Hazim Mohammed
  • 107
  • 1
  • 2
  • 10