I am creating a tkinter mainloop and allowing the user to login to my app. Once the user logs in, it kills that mainloop and creates another one, the actual app. (The main app is an already working, established app that I am not trying to add a login to). And I cannot figure out ..
I wanna create a simple GUI for a research project. For this I have plenty of widgets and I want to check what their type is. Lets take the entry-widget as an example. I have entries, which look like this: entry_modelling_script_folder = tk.Entry(self, width=40) entry_modelling_script_folder.grid(row=6,column=0) Now I want to check wether a certain widget is ..
from tkinter import * from tkinter import ttk root = Tk() root.geometry("600×400") root.resizable(False, False) def nameLength(event): str(input) length = input.split() length1 = len(garums) myLabel = Label(root, text=length1.get()).pack( ) choice = ("Word count", "Delete symbol", "Change 1st word with last word") options = StringVar() options.set("Choose an option") input = Entry(root) input.pack() menu = OptionMenu(root, options, *choice, ..
So I just want to make a simple table where the user inputs values for the mean, min, and max. This will then be displayed on GUI of Tkinter. I think I am almost there, but for some reason, I cannot seem to edit the label’s I created. from tkinter import * root = Tk() ..
I’m trying to change the background color of tkinter when a particular function runs. Problem i’m facing is the background color doesnt change until after the function finishes Is there a better way to do this? End results will have more methods when each method is called it should change the background color. class Test: ..
I tried to ensure that when I click on a button, the same window appears, so I created a function (oui) and I simply copy and paste the code already present, but when I run the program and when I click on the "yes" button, it only displays an empty window. Could someone help me ..
I have 2 different files. One has the root window code and the other has the top-level window code in a function that is called by a button in the root file. I want to insert in the entry_take entry field in the top-level window the value I put in the email_box field in the ..
I have this: from tkinter import * import numpy as np rows = 10 columns = 10 width, height = rows*18, columns*18 window = Tk() window.geometry(str(width)+"x"+str(height)) window.resizable(width=False, height=False) window.config(background="#A9A9A9") field_frame = Frame(width=width, height=height, bg="#A9A9A9", colormap="new") field_frame.pack(side=BOTTOM) field_frame.grid_propagate(False) pixelVirtual = PhotoImage(width=1, height=1) #To measure the size in pixels btnarr = np.zeros(shape=(rows, columns), dtype=object) def button_click(row, column): ..
I have a program that opens a window and a circle at the center that is filled green at the start. I want this circle to change from red to green and green to red each time I press a button (r in this code) however I can only change the color once from tkinter ..
How can the on_change_order method in the following script be implemented? import tkinter as tk root = tk.Tk() # Inserts labels 1 and 2 in sequence, using .pack() method label1 = tk.Label(root, text="Label 1", bg="red", fg="white") label1.pack(padx=5, pady=15, side=tk.LEFT) label2 = tk.Label(root, text="Label 2", bg="green", fg="white") label2.pack(padx=5, pady=20, side=tk.LEFT) def on_change_order(): """Swaps the .pack() order ..