Questions tagged [flowlayout]

Flow layout places components left to right and then top to bottom, allocating just enough place for each component.

Flow layout is similar to table layout but it allocates just enough width for each component. It has no "columns" because the width of the cells is most often different for every row. The difference between flow and table layout is less obvious when flow layout only has a single row (a quite common case in GUI).

345 questions
3
votes
2 answers

Why aren't my components wrapping in Swing's FlowLayout?

Why aren't my components wrapping in this JPanel using FlowLayout? They simply run off screen and are only partially visible. JPanel panel = new JPanel(new FlowLayout()); panel.add(new JLabel("TEST")); // ... repeat adding JLabels until they go off…
sdasdadas
  • 23,917
  • 20
  • 63
  • 148
3
votes
2 answers

all individual panels are not shown inside root panel

I want to add multiple jpanels to jpanel.So i added a root panel to jscrollpane.and then added all individual jpanels to this root panel.I made jscrollpane's scrolling policy as needed.i.e…
2
votes
3 answers

GtkFlowBox do NOT align in columns using horizontal orientation

In GTK I am trying to align widgets of different widths in a box such that they are next to each other in a line and flow into the next line if no more space is left. Basically I am trying to get similar results to Qt's Flow Layout as seen…
andrbrue
  • 721
  • 6
  • 15
2
votes
0 answers

How to scroll TFlowLayout content vertically?

I have a TFlowLayout containing 5 same-sized controls. The TFlowLayout (with Align=Top) is a child of TVertScrollBox. When making the flowlayout smaller all 5 controls are displayed as one column. This works fine. However, when these 5 controls…
Hans
  • 41
  • 6
2
votes
1 answer

FlowLayout ItemsControl in WPF

I need a really simple ItemsControl actually. I want all the items in the collection to be put left to right and when it's not enough space to fit the next element, it should be put on the next line. So basically like FlowLayout in Java Swing, or…
Øyvind Bråthen
  • 59,338
  • 27
  • 124
  • 151
2
votes
5 answers

How to remove space between collection view cell?

I have 3 cells, first cell has label, second cell has textfield, and the last cell has button, by using this it give automatic size but how to remove space between cells if let flowlayout = collectionView.collectionViewLayout as?…
Salman500
  • 1,213
  • 1
  • 17
  • 35
2
votes
1 answer

Prevent JPanel within JScrollPane from growing horizontally

I have a JPanel with FlowLayout that I'm dynamically filling with identical components (JButtons in the MWE). The JPanel is inside a JScrollPane. As I add components, I'd like them to fill left to right, kicking down to the next row once the top row…
LastStar007
  • 725
  • 1
  • 8
  • 21
2
votes
1 answer

Java JScrollPane and FlowLayout

After I got such great help yesterday from on of the users on this site, I decided to ask another question here and hope that you guys can help me. I want to code a frame that has components in them.They need to be on a JPanel and that JPanel should…
Ok iDoki
  • 79
  • 2
  • 10
2
votes
0 answers

How to add EditText left of TextView dynamically in FlowLayout?

I have created dynamic TextViews array list added to FlowLayout. Now I have to add one EditText at left of the each TextView when click on ImageView. Code : FlowLayout.LayoutParams params = new FlowLayout.LayoutParams( …
Shanmugapriyan M
  • 301
  • 5
  • 17
2
votes
2 answers

Create ViewGroup of ImageView and TextView and display it in FlowLayout Programmatically - Android

I have a Flow layout that display 4 objects for row, but I need display these 4 objects with a textview below each one of them. But it display 2 images and 2 textview, and junp to another row. I tryed to create a ViewGroup to display them together,…
2
votes
0 answers

Flow layout with nested container

In my Ext JS 6 app, I'm trying to create a flow layout with 3 containers, with the middle container having nested items that need to continue with the flow layout. I can get this working if I add the middle container's items directly, but I don't…
incutonez
  • 3,241
  • 9
  • 43
  • 92
2
votes
2 answers

How can I implement Flowlayout in java to make it so that my GridLayout can have a different sized button?

I programmed a calculator in java using a GridLayout method. I did not consider the fact that it would not make it possible to set different sized buttons. Therefore I am trying to find a work around instead since I could not figure out how to…
2
votes
1 answer

My custom ViewGroup doesn't scroll inside a ScrollView

I've extended ViewGroup to achieve something like a FlowLayout. I put my custom ViewGroup into a ScrollView, dynamically add a bunch of content and it doesn't scroll. The content that flows off the screen is not viewable. What am I missing, how…
Kevin
  • 2,605
  • 2
  • 20
  • 15
2
votes
3 answers

deselect NSCollectionViewItem by clicking on it

How can I deselect a NSCollectionViewItem by clicking on it again? This is the code I use for selecting and deselecting: func collectionView(collectionView: NSCollectionView, didSelectItemsAtIndexPaths indexPaths: Set) { …
sanjihan
  • 5,592
  • 11
  • 54
  • 119
2
votes
1 answer

UICollectionView custom flow layout crashes on scrolling

I am creating a custom flowLayout with section headers. here is my flowLayout.swift import UIKit class FlowLayout: UICollectionViewFlowLayout { override func layoutAttributesForElementsInRect(rect: CGRect) ->…
Ranjit
  • 4,576
  • 11
  • 62
  • 121