Questions tagged [tkinter-layout]

378 questions
-1
votes
1 answer

Can you place widgets relatively in tKinter?

Is there a way to position input boxes and such relatively to other elements in tKinter?
Shade08
  • 7
  • 1
-1
votes
1 answer

How can we get a layout like this in tkinter using grid?

I want a layout like this with the grid method where top part have 2 widgets that fill properly without overlapping and the bottom part have 3 widgets. I tried using columnspan attribute but it was overlapping.
Akascape
  • 219
  • 2
  • 11
-1
votes
1 answer

smaller way of making a button grid with Tkinter

I know Tkinter isn't the best way of doing this but I didn't think this could be the easiest way of doing it, I need it to be able to be increased and decreased in size as well and I don't see how I could do that using this method b1 =…
Trench
  • 3
  • 4
-1
votes
1 answer

How do I store the background color that the user uses for the next time that the programmed is opened?

root = Tk() root['bg'] = '#800080' def choose_color(): color_code = colorchooser.askcolor(title ="Choose color") root1['bg']= color_code[1] button = Button(root, text = "Select Back ground color", command =…
-1
votes
1 answer

Python tkinter - pack append vs pack separate from root

Am new to python and tkinter. Trying to write a simple python code to get the username and print it So, I tried the below root = Tk() # line 1 e = Entry(root, width = 50).pack() # line 2 option 1 - results in below error as shown below e =…
The Great
  • 7,215
  • 7
  • 40
  • 128
-1
votes
2 answers

Click on a button and open the content in a frame (direct way in frame and way with import script .py)

I would like to click a button and view its content on the rest of the screen (where the gray color is), but through the frame, not across the canvas. I would need 2 examples, but apply to my code please: example 1: click on button 1 and color the…
Erling Olsen
  • 1
  • 4
  • 15
-1
votes
1 answer

Only open 1 window when button clicked multiple times

I am trying to create a basic invoicing system. However i have encountered an issue as you can tell from my the title, is there any way to achieve this. I have been using a counter to determine if the window should open or not but i dont think it is…
-1
votes
1 answer

Grid function in Tkinter not working when creating multiple pages

I am trying to use the grid function instead of the pack function in Tkinter so I can arrange my widgets better, however it is not working. I get this error message: cannot use geometry manager pack inside .!frame.!startpage which already has slaves…
Minbutt
  • 59
  • 1
  • 6
-1
votes
1 answer

Trying to resize the frame

I was trying to add a files view in my text editor. Is there any way to resize tkinter frame by either x-axis or y-axis? example: like this resizing the files view. Is there any way to do the same in a tkinter frame?
-1
votes
1 answer

How to Move a button from one frame to another on click using tkinter?

I have 2 frames, one of them has a button "click". On clicking that button, the same button should be destroyed from the original frame and move to frame2. How to achieve it using tkinter.
Ishaan Joshi
  • 49
  • 1
  • 4
-1
votes
1 answer

How to dynamically insert text in tkinter Text widget?

I want to create a log window where I show records of error or success messages. Please tell me any solution to insert text in text_box from any widget in current application. Is any solution like we use textvariable Purpose: Suppose we have two…
Manish Pushpam
  • 146
  • 2
  • 16
-1
votes
1 answer

TKinter GUI resizing window dynamically with background and buttons

Need your help guys once again, building a GUI project and need to make it dynamically so the button, labels, entry box, background, and everything will resize when I'm changing the window size and fitting to the new window size. So far this is the…
DNC
  • 1
  • 2
-1
votes
1 answer

tkinter code does not proceed after .destroy() (multiple windows)

I am trying to create a simple tkinter application with two separate windows. The first window looks like this and is denoted plot_window in the code. It lets users select which columns should be plotted from dropdown menus. A category column is…
meerkat
  • 932
  • 2
  • 14
  • 38
-1
votes
1 answer

How can I place a label of top of this frame? Tkinter

I am trying to place a label on top of a Frame, which is inside a 'Notebook' tab. But when I run this code, the label always ends up in the center of the frame. from tkinter import * from tkinter import ttk class Window: def…
-1
votes
2 answers

Can't see tkinter buttons/labels in frame

I defined 2 buttons and a label to the frame but I can't see them. I tried with pack(), grid(), place(). if I comment out the frame lines I can see the effect on the container frame (right frame). Bigger picture: import tkinter as tk import…
Gilush
  • 81
  • 8