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
2 answers

Overlapping of label, entry and button while using Grid

I tried to follow the lesson on databases in this youtube video from freecodecamp. However, when I wrote my code and executed it, an entry box and a label are stuck on top of my button to submit a record. I don't know how to fix this issue. Using…
0
votes
1 answer

How to call local variable outside function?

I was trying to call local variables outside far from a function that I made. I was playing with Tkinter in python. Here is the sample code. Is that possible to call variables outside function anywhere? from tkinter import * font1 = "Roboto…
0
votes
1 answer

Tkinter - Click a button to open a new window with image in the new window

How to click a button to open new window with image in the new window? I already check other post but nothing solve my problem, so, I'm making this question for the first time. So this is my code from tkinter import * from tkinter.font import…
0
votes
1 answer

How to get the values of all the OptionMenu widgets within a frame inside a canvas in Tkinter

I'm writing a minimalist image tagging app that will list out all the image files in a specific location alongside a dropdown menu to select the options for tagging the image. Once the images are tagged, I need to save the changes to a JSON file…
vivekveeramani
  • 144
  • 1
  • 12
0
votes
1 answer

I want my code to wait unless either of two buttons is pressed

ui.py import tkinter as tk sc = 0 q_txt = 'Can you please verify the pythagorous theorem using similarities of triangle.' class Window(): var = tk.IntVar() def __init__(self): self.window = tk.Tk() self.window.title('Guess…
0
votes
1 answer

Changing background color to buttons generated in a for loop

I am making a tic tac toe GUI using Tkinter and buttons. Got over some stuff and now I wanted to change the background color when one of the buttons is clicked. The things I did so far I did with lambda but now I can seem to find a way to use the…
Clipz
  • 11
  • 4
0
votes
0 answers

Why doesn't the tkinter button doesn't show on canvas with turtle graphics

I am a newbie with python and I am creating a game just for fun. I tried using turtle with tkinter because I need buttons and turtle graphics. But the button doesn't show on the canvas. So here's some of my codes: root =…
0
votes
1 answer

How do I print a tkinter button for every entry in a list and make the command correspond to that list entry?

I am unable to figure out how to make a button appear and also make it do the right thing. O have been trying all sorts of ways to make a button for every entry in my list playlist and make it play the sound when pressed. Right now it prints a…
Skoelio
  • 13
  • 2
0
votes
0 answers

Function execution incompatible with Tkinter Button (Not a lambda thing, at least I think)

Yeah, so as the question states the function doesn't work with buttons, here's the code: Just for context the loop's prepose is to display each element in the 2d array stud, which stores data like this [[name, (p, class description), (a, class…
0
votes
1 answer

Why is my Tkinter button not executing my function?

from tkinter import * import random from collections import Counter root = Tk() root.title("Random") root.geometry("600x400") root.resizable(False, False) def open_saw(): saw_wn = Tk() saw_wn.title("Random App - Spin a Wheel") …
DRK CYAN
  • 21
  • 6
0
votes
1 answer

Placing a new image in a new grid position

I have situation here where I want to press the button and add an image in. I have managed to get the first in perfectly but when I press the button to add the next one in it just stacks it on top. is there a way that I can move the position of a…
0
votes
1 answer

show and hide password in Tkinter with binding Button and ButtonRelease?

I'm learning Python3 and tkinter. I was trying to show password with binding
Cristian
  • 155
  • 8
0
votes
1 answer

Returning values in lambda function while using Tkinter button

I've utilized the lambda function to call two different functions (read_input_data(), which reads data a and b from GUI, and run, which takes the data a and b and makes some computations) after a Tkinter button is pressed start_button =…
0
votes
1 answer

how can I set that a button give me the answer of the entry in the tkinter?

i tried to make a simple code to do a joke with my friends. It's based in: they entry with her names, and when they clicked in button, a answer appears. Before this, i maked a simple code based in: if(xxxx), so print(xxxxx). Now, i using tkinter to…
0
votes
1 answer

Tkinter call functions from page initialization

I am working on creating a basic GUI in python using tkinter. I want the get_analysis() function to be called on the switching of the page.(Switching from one page/window to another) However, I am yet to find how to call this function from the…