Questions tagged [tkinter-layout]

378 questions
0
votes
1 answer

Arrange dictionary items on a gui grid

I have a dictionary: data = {"Angles": {"Hip": ["x", "y", "z"], "Knee": ["x", "y", "z"], "Ankle": ["x", "y", "z"]}, "Moments": {"Hip": ["x", "y", "z"], "Knee": ["x", "y", "z"], "Ankle":…
0
votes
0 answers

"width" not found in .place with customTkinter

I have this code of a frame in customTkinter version 5.2.0: import customtkinter as ctk # window window = ctk.CTk() window.geometry('400x300') # widget frame = ctk.CTkFrame(window) frame.place(relx = 0.5, rely = 0.5, width = 20, anchor =…
Lory1502
  • 21
  • 3
0
votes
0 answers

How can I display an image over a video player in tkinter?

I made a video player using tkinter. I'm using the vlc media player to play the video. Now I want to have an image display on top of the video as the video plays, its a pointer of some sort and needs to move around on the video based on the x and y…
Xay
  • 9
  • 1
0
votes
1 answer

grid_slaves equivalent in Canvas in tkinter

I'm trying to access an item in Canvas in tkinter, like I can in a Frame using grid_slaves() Let's say for example I want to access a subwidget: subwidget = Frame.grid_slaves(row=0, column=0)[0] I can't use grid_slaves() on a Canvas, and I was…
Jsmnbx
  • 1
0
votes
1 answer

Tkinter frame not showing border

I am using the Frame widget in tkinter and have used highlightthickness and highlightcolor attributes. I have then added my label into the frame, however when run, the label appears on the window however the frame is not? The frame must be there or…
user21708146
0
votes
1 answer

Tkinter treeview not being placed at the right coordinates

I have placed a treeview widget in my tk window with .place() but it is being placed in the wrong coordinates, around 100 pixels off in both x and y, verging closer to 0. The size of the treeview is also affected, making it smaller than it should…
JR RJ
  • 13
  • 2
0
votes
1 answer

Using python tkinter, how do I make buttons invisible?

As someone who is relatively new to coding, I am trying to create my own chess game. Currently, I am facing a challenge in attempting to make my buttons invisible while still allowing them to execute piece movements. Any advice or guidance would be…
0
votes
1 answer

Changing Vertical Space between Tkinter Widgets in a TopLevel Window

I am building an Automated Data Preprocessing tool in Python where I am using Tkinter for the GUI, In the new_window, which is a TopLevel Window I want to shrink the vertical space that is unoccupied between inputs_frame and the text_widget3, and I…
0
votes
1 answer

_tkinter.TclError: bad option "-row" error

Im trying to make a GUI calculator, a very basic one, it only has division, subtraction, addition, and multiplication. I use the Tkinter module. I make buttons, labels, and entry widgets, then display them with pack()function, everything is going…
0
votes
1 answer

Unexplained radio button positioning in Tkinter

This is a 'nit', but it's driving me nuts. I'm trying to position three radio buttons in a Label Frame. The radio buttons all have the same padding, but the spacing between buttons 1 and 2 is about 1.5x more than between 2 and 3, using the exact…
Jim Rutter
  • 45
  • 4
0
votes
0 answers

Tkinter labels unwantedly randomly disappears

I have created a code that takes random "cocktail of the day" from JSON. Everything works great: click on image refreshes data, click on Fav icon stores current data in sql (like an local archive), click on the header changes from online/local…
NeoA
  • 1
  • 1
0
votes
1 answer

Unable to add background image to text widget: tkinter

So I have constructed a simple tkinter application in which text gets updated every few seconds, but I am unable to add to background image to it. import tkinter as tk import requests def updateText(): r = requests.get('https://***') data =…
0
votes
2 answers

The matplotlib plot gets overrited every time the button is clicked

The following code draws thw graph everytime the button is clicked. I want the plot to get updated instead of overriting def plot_cr(): section_length = 220 section_width = 220 angle = np.linspace(np.pi, 3 * np.pi / 2,…
0
votes
0 answers

Overwriting tkinter labels in gridview

Trying to make a dashboard using excel as backend which displays the data associated to the selected value; approach is simple select name click on button select to display problem: the previous label is not getting overwritten def display(): …
0
votes
0 answers

Tkinter background color change alone

i'm doing a tkinter application, and i have this problem: I have a Frame with this code: class SelectFrame(customtkinter.CTkFrame): def __init__(self, master, back): super(SelectFrame, self).__init__(master) …