Questions tagged [tkinter-button]

Use this tag when you are referring to the tkinter button, created with the function tkinter.Button(). DON'T USE THIS TAG TO REFER TO ANY OTHER BUTTON.

346 questions
0
votes
1 answer

Can't change state of a button in Tkinter Python 3.x

Im creating an app where there is a window that opens another window. While this happens i want to set the state of the buttons that initialize this procedure as DISABLED but i keep getting this error. def main(): def modify(): …
Savvidaios
  • 11
  • 1
0
votes
1 answer

python tkinter button commands

so I have a tkinter window with a play button import tkinter from play_function import * window = tkinter.Tk() screen_width = window.winfo_screenwidth() screen_height = window.winfo_screenheight() window.config ( width = screen_width…
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

How to update the radio button in tkinter if the button has been ceated inside the function

I want to update the cspray window with new radio buttons . But now the buttons gets overrited everytime the clicked_value function is called. def clicked_value(self): if clicked.get()!="": for row in tree_caster_data.get_children(): …
0
votes
0 answers

tkinter button runs on start and NameError filedialog

I'm programming a GUI with tkinter, but I'm a noob with this. My GUI-code is kinda big so I wanted to seperate the functions and the GUI code - so far so good, but when I want to import the Functions I get a NameError, otherwise if I put my…
Tom
  • 11
  • 3
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

Buttons and other active parts of TKinter

I have a problem with TKinter radiobuttons, checkerboxes, buttons and fields. I'm not sure if I can put multiple questions in one but basically it's a single question but quite big. First part is that I can't setup my checkerboxes correctly. I wrote…
smbrine
  • 1
  • 2
0
votes
0 answers

What is the problem in my pomodoro countdown?

I was recently trying to create a pomodoro app using tkinter and customtkinter but my app is crashing when I click on the play button. def counting_down(): minute_left = int(timer.get()) - 1 second = 59 for i in range(60*minute_left): …
0
votes
1 answer

PRNG, python. 1 button - 2 function?

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…
liza
  • 5
  • 2
0
votes
0 answers

How to give button command from one class to another class Tkinter python?

I am doing one problem now. I want to print something by using "def select" in window 3. I need to give "def select" command to "proceed" button which is present in Window 2. I tried but I don't know how to do that.I am new to programming and…
user20623107
0
votes
1 answer

How to create message box to show error message when no radio button is selected in Tkinter?

When I click a proceed button in window 2, I want to show error message when no radio button selected. but it shows error like " if v != [1,2,3]: NameError: name 'v' is not defined" class Win2(tk.Frame): def __init__(self, parent, controller): …
user20623107
0
votes
1 answer

How to select all checkboxes and give that command to button in another class in Tkinter?

from tkinter import * import tkinter as tk class Win1(tk.Frame): def __init__(self, parent, controller): tk.Frame.__init__(self, parent) Label(self, text= "ISMC", font= ('Helvetica 20 bold')).pack(padx=5, pady=5) …
user20623107
0
votes
1 answer

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

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 it all into a GUI, the buttons display the correct…
D Mac
  • 3
  • 2
0
votes
2 answers

Using a Tkinter button input to pass as argument

I'm using tkinter to create an option menu, where choosing an option will call a function specific to each option. However, I'm unable to figure out exactly how to do that. This is the code that is currently being used. import pandas as pd import os…
0
votes
1 answer

Tkinter error: image "pyimage2" doesn't exist working with classes and frames

i'm working with classes on tkinter and i have this problem: Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\tkinter\__init__.py", line 1921, in…