tkinter-entry

Tkinter binding button press to functions

Tkinter binding button press to functions Question: I have a UI with an entry, and a button that deploys multiple functions using said entry. ent = tk.Entry(frm_top, textvariable=entry_input) btn_confirm = tk.Button(frm_inner_bot, text="Confirm", width=25, height=2, command=lambda: [main.save_template(entry_input.get(),filedialog.askdirectory()),update_main_window(label, listbox), create_template_window.destroy()]) I would like to be able to press from the entry and do the same functions as …

Total answers: 2

How to display the result of a formula in a tkinter Entry textbox

How to display the result of a formula in a tkinter Entry textbox Question: I`’m building a GUI for an engineering software that I’ve created and, being a beginner on Python, I’m having trouble with the code. I’ll try to simplify my problem and describe what I want to do: Using Python and Tkinter, I …

Total answers: 2

How to restrict user to enter only one period '.' that too after a digit

How to restrict user to enter only one period '.' that too after a digit Question: I am trying to achieve below situation, below code is part of a TKinter GUI program Allow empty string Allow integer Allow float Allow period ‘.’ only after atleast a digit allow entry of only one period ‘.’ in …

Total answers: 1

Only returning 0.0 when entering value into entry

Only returning 0.0 when entering value into entry Question: When entering value into entry tabs only return 0.0 for both could anyone help I’ve tried IntVar and StringVar from tkinter import * window = Tk() point_label = Label(window, text="Amout of Points").pack() point_entry = Entry(window, text="points", bd=5).pack() Games_label = Label(window, text="Amout of games played").pack() Games_entry = …

Total answers: 2

Configure Entry Text color for only 1 character in Tkinter

Configure Entry Text color for only 1 character in Tkinter Question: I am making a project in which I created a tkinter window, and in it there is an Entry widget. I need to change the color of the following Entry widget. The following is what I did. self.input_entry.config(fg="red") input_entry is the Entry widget. This …

Total answers: 2

Adding different values ​to the entries created with the loop

Adding different values ​to the entries created with the loop Question: For example, I want to insert the numbers from 1 to 10, respectively, from the beginning to the end, into the 10 entries I created with a loop. from tkinter import * root = Tk() root.title("") root.geometry("500×400") canva = Canvas(root,width=450,height=350,highlightbackground="black") for i in range(40, …

Total answers: 1

How to retrieve user input from Entry using Button Tkinter?

How to retrieve user input from Entry using Button Tkinter? Question: I’m trying to build this small window using Tkinter where people upload a link and it just returns it (the project is more complex but let’s simplify). This is the function that just prints the link string: tag_list = [] def add_product_link(link): global tag_list …

Total answers: 1