tkinter-button

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

Python Tkinter Button Not Showing Up

Python Tkinter Button Not Showing Up Question: I used Tkinter Designer by Parth Jadhav to generate the UI of it, I have gotten no error but the button still doesnt show up The Code: from tkinter import * import new_post from pathlib import Path from tkinter import Tk, Canvas, Entry, Text, Button, PhotoImage def home_page_screen(): …

Total answers: 1

Tkinter button size is not accurate

Tkinter button size is not accurate Question: I want to set the size of a button in Tkinter, but it won’t be as big as I want. It should be 100 pixels high and 100 pixels wide, but the button almost takes up the 800×600 window. enter image description here I am using this code …

Total answers: 1

Issue initialising the Tkinter button class when making an extension of it

Issue initialising the Tkinter button class when making an extension of it Question: I am using python 3.11 and Tkinter. I am making a colour palette creator using python and tkinter. I am using a class for the colors in the palette. Here is my code: from tkinter import * import tkinter as tk import …

Total answers: 1

PRNG, python. 1 button – 2 function?

PRNG, python. 1 button – 2 function? Question: help me please. It is necessary that when the ‘Generate’ button(gen) is pressed, 2 functions (clicked1, gen1) are executed. But it only run clicked1. I read that I can use lambda; or create a separate function that includes the ones you need. But gen1 still fails. but …

Total answers: 1

Why do these buttons open the same file regardless of which on I select?

Why do these buttons open the same file regardless of which on I select? Question: I’m making a pdf ‘date checker’ in Python which tells me if every page of the pdf has tomorrows date at the top (for checking newspapers as part of my job). So far so good until I attempted to put …

Total answers: 1

tkraise is not functioning

tkraise is not functioning Question: I am trying to create two buttons to switch frame config by raising different Frame above an other. but the tkraise() function doesn’t seems working… Please help to check if there are any mistake or concept error of using tkraise. Thanks for helping import tkinter as tk from tkinter import …

Total answers: 1

I am having trouble with a button in my first gui application

I am having trouble with a button in my first gui application Question: def play(): wind2 = tk.Toplevel() v = tk.IntVar() ques = ["Identify the least stable ion amongst the following.", "The set representing the correct order of first ionisation potential is", "The correct order of radii is"] o1 = ["", "Li⁺", "Be⁻", "B⁻", "C⁻"] …

Total answers: 1