Questions tagged [grid-layout]

Grid layout is used to align content into columns and fields. Unlike table layouts, grids are composed of guide lines so that elements positioned relative to the grid can have drag and drop behavior.

GridLayout is similar by concept to the table layout, placing objects into multiple rows and columns so that all cells in the same column usually have the same width.

grid layout is a "CSS table" that allows to divide available space into columns and rows using a set of predictable sizing behaviors. Unlike HTML table, CSS grid layout is defined in CSS, placing HTML objects into the cells by id.

GridLayout supports cell padding and may have unspecified number of rows (there are enough rows to place all elements using the specified number of columns, new rows are added as required). It does not support cells spanning over multiple rows or columns (another layout, GridBagLayout does).

Resources

2180 questions
0
votes
0 answers

Grid Layout spacing between elements issue

Hello I am trying to create a GUI where there are two screens side by side with controls underneath each screen and then a set of master controls to control both screens at the same time. Im using grid layout and it is cause there to be a giant…
Mark Harrison
  • 151
  • 1
  • 10
0
votes
2 answers

Custom GridLayout

I'm trying to make some auto fill grid, but without know the width from every item. So, the width from child can be deferent in every row and every column. It only depends from a TextView. I want something like this. I'm tried with GridLayout and…
0
votes
1 answer

placing items into a panel with gridlayout

Hey everyone I am trying to draw a checkerboard in Java with GUI. I have created a square class for the squares of the game board. Square Class: import javax.swing.*; import java.awt.*; public class Square extends JPanel { private int width =…
j.doe
  • 23
  • 8
0
votes
0 answers

GridLayout Design row column hint

this might be a silly question but I looked everywhere and can't seem to find the right keyword to know how to solve this. Basically in my Design tab, you know when you are dragging items on a GridLayout, every tutorial I see shows that there should…
Badonga
  • 45
  • 1
  • 6
0
votes
1 answer

Responsive grid with drop down row under selected row

Yeah I don't really know how to explain this, so here's a diagram of what I want. Basically I want a grid of "items" that's responsive (simple with a grid or flexbox). However I also want it to display a description in a row underneath the currently…
Hakase
  • 1
  • 3
0
votes
1 answer

Collapsing gaps in CSS grid when using auto-fit - unwanted behaviour when columns wrap

I'm trying to use the auto-fit feature of the CSS grid to wrap grid items neatly for different screen sizes. This works well when all items I put into the auto-fitted grid container are of equal size; however if I make the items different sized, for…
ahx
  • 1
  • 2
0
votes
1 answer

GridLayout Squished Together in JFrame/JPanel

I am trying to create a TicTacToe Game'. Only one board is playable by the user and when the user clicks on a cell the cell will be filled with an X/O and the same cell(on a randomized spot of the second board) will be filled with an X/O. The user…
fzk
  • 25
  • 8
0
votes
1 answer

Determine points inside each cell of a grid and add a new column to a dataset

I have a dataframe df with a point each 0.1 unit: df <- expand.grid(x = seq(0, 20, by = .1), y = seq(0, 20, by = .1)) I defined a new dataframe grid which has a point each 4 units: grid <- expand.grid(xg = seq(0, 20, by = 4), …
Ndr
  • 550
  • 3
  • 15
0
votes
1 answer

Recreate grid mixins from lost sources

In an old site the mixins to create the grid are lost. I'm not sure if it was using susy, or singularitygs .. but one of those two, I guess, adn older versions, I guess. From the front end, I've been able to retrieve the rendered values. It seems…
commonpike
  • 10,499
  • 4
  • 65
  • 58
0
votes
1 answer

Grid layout for Bootstrap

I'm having a hard time styling my columns in a certain way. I have 2 rows containing 2 columns each of the same size. A B C D I'm supposed to add a longer column that encompasses both rows next to it. A B E C D E With E having the equal length of…
CodeCodeCode
  • 37
  • 1
  • 1
  • 9
0
votes
1 answer

Boxes with fixed span to fill entire column

I am a first time CSS-Grid user: What I try to achieve is to have a flexible box system using a 3-column grid to which I can simply add boxes of the size of 1, 2 or 3 columns; just using one class. I tried to achieve this by doing this…
Matthias
  • 35
  • 5
0
votes
1 answer

CSS Grid dimensions not behaving as expected

I am trying the new CSS Grid Layout but I am having some unexpected results. My first issue is that my footer is not occupying 98% of my viewport width, my header has the exact same code and looks fine. The second issue is that the page looks like…
Ninja2k
  • 819
  • 3
  • 9
  • 34
0
votes
1 answer

How to separate a JTextField from the rest of the GridLayout

I'm trying to make a calculator as a fun project. But as I try to make it look like a... calculator, it just turns out like one big grid, as follows: I've tried to follow along with whatever I found on the Internet, but that was a big bust. Can…
JBoy Advance
  • 78
  • 1
  • 13
0
votes
1 answer

Can this responsive grid be formatted properly

I've got a grid of images that I'd like to display as in the image here: Unfortunately the bottom row are pushing down out of alignment. I'm adapting Graham Miller's Responsive Grid System, which is wonderful. Here's the code I have so far: CSS: /*…
Ralphatron
  • 63
  • 1
  • 8
0
votes
2 answers

Dynamically populate variable number of sprites on grid layout group

As the title suggests, I'm trying to populate a UI panel with a GridLayoutGroup component at runtime with sprites from the resources folder. The problem is that the sprites do not auto-align to the grid cells, instead getting drawn on the center of…
Rookatu
  • 1,487
  • 3
  • 21
  • 50
1 2 3
99
100