All Questions
Tagged with grid-layout user-interface
69
questions
14
votes
2
answers
12k
views
How to make Android GridLayout compatible to older version?
New GridLayout for Android 4 is good. Both in terms of code maintainability and performance.
I wanted help with backward compatibility for GridLayout for older version. Waiting for official ...
9
votes
2
answers
13k
views
How does one fill a QGridLayout from top-left to right?
I would like to fill a QGridLayout with QWidgets. The QWidgets need to appear in a top-left to top-right fashion and proceed to fill the down downwards after each row is filled with QWidgets. An ...
8
votes
6
answers
13k
views
Invisible components still take up space JPanel
I have a series of components underneath each other in a JPanel set as a GridLayout.
I need to temporarily hide the components but setVisible(false) doesn't cut it, because there is still an empty gap ...
7
votes
3
answers
12k
views
Tkinter Grid Dynamic Layout
I am wanting to create a grid layout, with a grid that fills the first row until it runs out of space in the window, and will dynamically move items to the row below (like text line-wrapping). As the ...
6
votes
3
answers
876
views
How do I create the following GUI in Java Swing?
I want to create the following GUI with Java Swing.
Since I'm not experienced enough with Java Swing, I'm not sure how to exactly recreate that GUI.
I've tried using GridLayout which looks like this:...
6
votes
1
answer
4k
views
Dynamic GridLayout with fixed size
Guidance required..
Would like to achieve something like the image below whereby the child panel stays the same size but contains up to 4 components. I realize I can achieve this by changing the ...
6
votes
1
answer
10k
views
Gridlayout with borders
I'm a new Android developer, and I'm just trying to improve my skill by reading some samples, I want to design a new interface using GridLayout, I've checked a lot of samples but I can't seem to draw ...
4
votes
1
answer
3k
views
Centering Radio Buttons in a GridLayout
I am trying to create an application using GridLayout and I don't know how to center some radio buttons. The window ends up looking like:
Here is how I added the radio buttons:
JPanel qArea = new ...
4
votes
1
answer
735
views
Grid Layout Width Issue
I have been developing an app for which I also need to handle the UI stuff too.
Heres my XML:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="...
4
votes
2
answers
2k
views
gridlayout's children visibility gone
This is my .xml.
When I touch the cell - visibility sets as View.GONE, but it just disappearing as View.INVISIBLE. There is an empty space in the place when cell was. The size of cells is fixed.
How ...
3
votes
2
answers
2k
views
Change GridLayout in Java from horizontal to vertical with event.
I have a project im working on. Im trying to change the flag layouts from horizontal to vertical on the button press. Ive added a line of code to change the grid layout under the if "Bulgaria" ...
3
votes
1
answer
1k
views
Java GridLayout is laying out all my JPanels in the top left corner
SOLVED:
Just found out what the problem was, after trying to make an SSCCE.
It had to do with my cell class, I didn't realise I was overriding getX() and getY() from the JComponent class.
After ...
2
votes
2
answers
2k
views
How can I you dynamically rearrange items in a gridlayout using java?
I need to rearrange items that are in my GridLayout so when a JButton is created dynamically, that the footer (i.e. JLabel) stays at the bottom of the grid, and the dynamically created button goes ...
2
votes
1
answer
6k
views
Multiple Java GUI Components in one cell of GridLayout?
Is it possible to add three JTextFields inside of one cell in a Java GridLayout? If not, how can I have a grid based layout where I can set the preferred height of each cell and add more than one ...
2
votes
1
answer
116
views
Using empty gridLayout, but will hold ImageIcon and store information later. Can i modify the size?
Below is my code, which is meant to create a grid on the left hand side, which is does, however the two grids are made very long and thin, and even when later on i add the image to it it remains the ...
2
votes
1
answer
169
views
Grid layout doesn't work properly on API level 19?
I am facing a problem and I have searched a lot about it but couldn't find a solution.
I used a grid layout in my design and it works fine with API level > 19, but when I run my App on API level 19 ...
2
votes
1
answer
374
views
Kivy: assigning actions/classifying buttons in grid
I'm having an issue with assigning actions to the buttons I've put in a grid in kivy. Any help would be appreciated.
I am new to all things coding but I have been trying to work this out. I tried to ...
2
votes
0
answers
99
views
add an image to GridLayout in a .kv file from python
How can I add an image object to a GridLayout defined in a .kv file?
Is this possible?
I have tried
ui.py
class Field(Widget):
grid = ObjectProperty()
grid.add_widget(Image(source=&...
1
vote
3
answers
355
views
Massive space between components
Please have a look at the following code
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class GridLayoutTest2
{
private final JDialog msgDisplayer;
public ...
1
vote
3
answers
1k
views
Using different layouts in GUIs
This is what my program should look like and I'm a bit confused on where I should use different layouts.
I have a Window class which calls the Panel class and the Panel class calls the InputPanel ...
1
vote
1
answer
2k
views
How to stretch cell horizontally using grid in Tkinter?
I was using tkinter to make simple GUI and I wanted to make it too simple and cool so I wanted to this label ********** to be filled in screen but the there is no option for fill in grid like in pack ...
1
vote
2
answers
67
views
Numberpad Not Displaying Correctly
I have a Java GUI project where I am creating an ATM. I have everything setup, but for some reason my number pad on the left is not displaying properly. It should appear as a 4x3 grid of numbers, but ...
1
vote
2
answers
1k
views
how to update a container in java that already has data in it
Hi all i need to update a containers data for a sudoku game i am creating but am struggling to get the field to update with the new data.the container uses a grid layout and each cell contains a ...
1
vote
1
answer
819
views
Panels overlap each other when box not big enough
I have this gui; and when the height is not big enough the panes will overlap each other. I have to set it at least 200, so I can completely see the two rows; but when it is set at 200, then I have ...
1
vote
3
answers
1k
views
GridBagLayouts in GridLayout
Trying to build about this GUI in Swing:
In my MainFrame i set a GridLayout like that to achieve 1 row, 2 columns:
setLayout(new GridLayout(1, 2));
In the Left Column i figures i would need a ...
1
vote
1
answer
388
views
SWT- equal weights to GridLayout row elements?
I'm trying to add 7 Text widgets to a GridLayout row.
I want them all to be of the same width, but they come out funky:
//Columns
for(int i=0;i<7;i++) {
text = new Text(shell, SWT....
1
vote
1
answer
34
views
jButtons doesn't add correctly
For better reference I'm doing match3 (candy crush type) game.
public class BoardGraphics extends JPanel {
public static final int WIDTH = 400;
public static final int HEIGHT = 400;
private static ...
0
votes
1
answer
114
views
How do I use GridLayout in Swing?
I tried making a GUI with Swing. But when I trief using GridLayout every element sudenly disappears and I don't know why. Can someone explain and/or provide a solution?
I've tried looking at the ...
0
votes
1
answer
1k
views
Java GUI - remove all components and redraw
I have a grid layout JPanel, with many icons drawn on it. I need the icons to change after the player moves because the map changes. Here's the method I came up with:
public void initGridIcons(JPanel ...
0
votes
1
answer
3k
views
Gui - JPanel adding JComponent into GridLayout cell
I'm trying to display a frame using GridLayout, but one of my panels isn't displaying.
The JPanel that I'm having trouble with (gridPanel) is supposed to have a 50 by 50 GridLayout and each cell in ...
0
votes
1
answer
93
views
Java - Problem during the creation of a stock JPanel
I am attempting to create a JPanel that houses in a GridLayout a number of JLabels to the left JTextFields on the right. Unfortunately, nothing is shown even if the Components are reported as ...
0
votes
2
answers
342
views
Is it possible to animate frames that are layed out with the grid manager in tkinter?
I made this desktop application with tkinter and finished the main functionalities.
But now I want to make it look better and even animate the menus is possible.
The thing is the buttons and widgets ...
0
votes
1
answer
746
views
Add components to GridLayout starting from the last component?
I'm writing a small board game program, and there's a small hiccup that's preventing me from progressing: The game board is composed of 4 grid layouts (one for each side of the board, top and bottom ...
0
votes
1
answer
23
views
Changing size of a panel
Soo I'm trying to make two panels and I wanted the top panel to be at least 2/3 of the window. I used GridLayout and it splits it in half, and I want to make it soo that the top is a little bit bigger....
0
votes
2
answers
5k
views
Display a GUI with two panels including three buttons for each panel
I need help with design and implement a basic GUI with multiple action components. The objective is to create two panels and six buttons. Each panel has three buttons.
So far, I coded in Java ...
0
votes
3
answers
397
views
I cant figure out how to use java gui / layouts?
how can I make a gui interface with everything in order I know the borderlayout, flowlayout and gridlayout but what is panel? im so confused please help in visual basic I just dragged and dropped. im ...
0
votes
1
answer
2k
views
Placing multiple buttons in same column - Tkinter using grid
I am trying to create a GUI for displaying data in a way that the user can flip through pages using the page buttons on the bottom (page 1, 2, 3, etc.) The problem is currently the entire window I ...
0
votes
1
answer
58
views
Cannot decrease vertical gap between JLabels in Grid Layout
I am creating a profile interface for my customers. However, when I am specifying the number of pixels in my Grid Layout, it does not seem to work. I have tried to decrease the height of my JLabels ...
0
votes
1
answer
169
views
Java: Gap in the beginning of a GridLayout
I'm trying to code a game in Java and I'm currently doing the title screen.
I want to have three buttons in the middle that are placed underneath each other.
Those buttons are "Play", "Options" and "...
0
votes
1
answer
1k
views
Handling exceeding/outer space in GridLayout
When using a GridLayout, it diveds its container's space evenly between its row and column elements. However when calcuating the cell width wouldn't turn out in an integer, the exceeding space is put ...
0
votes
1
answer
588
views
WPF Column set MIN height by dynamic margins?
Is it possible to set the minimum height of a row to be dynamic based on the content? A brief explanation:
I have this piece of UI:
The whole thing is divided into a grid with two rows, one * ...
0
votes
3
answers
236
views
Gridlayout and mouse listeners
hi i am trying to build a grid-layout GUI with mouse listener. SO when a particular cell is clicked in a grid ,information would be displayed. I don't know where to start, any help would be good
...
0
votes
2
answers
26
views
How do I get the textfields and the labels to sit in a 7x3 grid?
The first column in my grid always comes out right but then the rest begin replacing the other cells. Also the border layout does not seem to be functioning. I do not know what the problem is. It ...
0
votes
1
answer
235
views
Getting FillLayout to behave correctly
I am trying to create a view with two trees that take up the entire display. As of now, the two trees are only taking up half (left half) of the canvas. I cannot figure out why, as I have tried many ...
0
votes
1
answer
374
views
Tkinter Grid Layout Widget not in parent
I am building a GUI in Python with Tkinter however I am having issues with the Grid layout. Am I right in assuming that if you specify a parent, that child then sits at the grid position you specify ...
0
votes
1
answer
53
views
Error when trying to position two TFrames on the Tkinter grid
When trying to position 2 TFrames on the main TFrame grid, it ends up with a gap between the two that shouldn't exist
Here is the code:
import tkinter as tk
from tkinter import ttk
class App(tk.Tk):
...
0
votes
0
answers
40
views
Python Tkinter Question: Getting It All To Fit In The Window
I'm working on a tkinter application where I have a window with several widgets placed using the grid geometry manager. I'm trying to adjust the width of the columns to make the layout more compact, ...
0
votes
1
answer
43
views
How to Count The Number Of Columns Of An AdaptativeGridView
I need to apply a horizontal separator line bwteen items, when columns number change. So, it's necessary to get the number of columns of this UWP AdaptativeGridView, inside a SizeChanged event.
...
0
votes
1
answer
244
views
How to add many views to GridLayout without blocking UI?
I want to display a grid layout in a fragment with thousands (>1.000) grid cells. In order to save code lines, I want to add the grid cells programmatically when the fragment is created. The grid ...
0
votes
0
answers
75
views
Can't space listBox and buttons using tkinter
I've created a new frame that will hold:
-A label
-A listbox
-A button
The frame is part of the main window.
When I run the application, the label, listbox & button are close to each other and I ...