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

How do I handle taking input from TKinter Input Boxes?

So! I take an input into an entry box in tkinter, and when the user clicks submit, I want a function to run. Example of my code is below - error is that 'Login is not defined'. How can I fix this? Where should I be defining my function? import…
-1
votes
2 answers

How to open two modules in one window, Python Tkinter

I have a question: i am tossing the code from 2ch files, i have already lost ideas. Calling fileA.py opens a window for me with two buttons exit and start. Exit works but when I click start I need to open the second window fileB.pt. (I want both…
-1
votes
2 answers

I can't import font and anchor. I updated python, but it's still not working. It's not my main app, but it's example

Can't import alot of stuff from tkinter, like Font and anchor from tkinter import* from tkinter import font from tkinter import ttk import tkinter win= Tk() win.geometry("300x550+970+45") win.title("Gui") l= Label(text="Save File").pack() btn=…
-1
votes
2 answers

How to make a condition that states when you click a button your input will show as messagebox

I don't know how to print the calculator's answer outside the place where it is entered. The code that I want to insert is: Button(master, text="Submit",width=23, height=3, command=lambda(?)).grid(row=5, column=0, columnspan=3) ? = The thing that i…
-1
votes
1 answer

smaller way of making a button grid with Tkinter

I know Tkinter isn't the best way of doing this but I didn't think this could be the easiest way of doing it, I need it to be able to be increased and decreased in size as well and I don't see how I could do that using this method b1 =…
Trench
  • 3
  • 4
-1
votes
1 answer

get attribute cant be used on an entry

I am trying to make a Jenga Scorer and I am just making a players list. When making this, I stumbled upon that I can't get an attribute from an Entry. The qadd is the function that does this. Code: from tkinter import * players = [] def…
-1
votes
1 answer

Python. Passing a different value for each button command to the same function

I have a loop which creates a list of buttons and grids them to form a square depending on the size from the user and I want each button to pass the loop index to the same command/function, but when the button is pressed it always passes the last…
-1
votes
1 answer

tkinter: How to start a new line after opening parenthesis?

I have a program with my code, the idea is: I have a textbox, I put a text in it and with I button I need to create a new line after any open parenthesis. I have little experience with tkinter and I don't even know where to start to do this, I also…
-1
votes
2 answers

The activebackground button function in tkinter, python is not working for macOS Big Sur Version: 11.6

This is my code: import tkinter as tk window=tk.Tk() window.title("Click Me") click=tk.Button(window, text="Click Me", highlightbackground="blue", activebackground="red") click.place(x=200,y=300) window.mainloop() It doesn't return any error to…
-1
votes
1 answer

'NoneType' object has no attribute delete

I have created a program that creates a citation based on entrybox inputs. I am trying to add a button that clears all the entryboxes when clicked; however, I find that the error 'NoneType' object has no attribute delete occurs since none of my…
ks08
  • 84
  • 1
  • 9
-1
votes
1 answer

Is there somehow i can rotate button in python tkinter?

Open_app = Button(window, bg = '#1E9099', text = "Open Google", fg = 'White' ,command = open_chrome,highlightthickness=0,bd=0, width = 10, height = 2) Open_app2 = Button(window, bg = '#D53A33', text = "Open VScode", fg = 'White' ,command =…
-1
votes
1 answer

Only a single pixel visible in place of a Frame in Tkinter

I am creating a form for booking a table in Tkinter. I wanted to add border color to a Button, so I created a Frame and placed the Button inside the Frame. But after making the Frame and placing the button inside the Frame, the Button disappeared…
-1
votes
1 answer

Tkinter button widget bugging

Short description: I made home window where I'm entering TopLevel window where buttons are created in loop with data from database, let's say that 4 buttons are created and names 1,2,3,&4 for example. So when you click on one of those buttons there…
Freezy
  • 89
  • 1
  • 8
-1
votes
1 answer

tkinter runs code without pressing button

import tkinter as tk from ftplib import FTP pencere = tk.Tk() pencere.title("Title") pencere.geometry("800x300") def deleteAllFiles(ftp): for n in ftp.nlst(): try: if n not in ('.','..'): print('Working…
BooWalker
  • 1
  • 3
-1
votes
1 answer

How do i send value via command in Tkinter Button?

I am writing my first "big" project - simple calculator with Tkinter UI. Having done the visual i got a problem of sending the digit/math operators to the screen of the calculator. When i try to send the digit into the adder() via argument it…
1 2 3
22
23