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

Connect a variable integer to a radio button value

I am trying to make a program which could use a standard load by clicking the standload radiobutton or a variable load by clicking the variable load radiobutton. This variable load can be chosen by filling in a entry. Unfortunetely, I am not able to…
0
votes
1 answer

Copy to clipboard output button not working, tkinter ui

import tkinter as tk import ttkbootstrap as ttk import random import pyperclip # Basic Random Code def randomcode_press(): code_length = entry_letters_int.get() code =…
anrunt
  • 11
  • 1
0
votes
1 answer

Python 3 & Tkinter: How to run conditional block based on choice between buttons

I am converting a text based card game, written in Python 3, to a UI via tkinter. There are many instances where the player is prompted to make a choice. Getting this choice in text format is easy, however I am stuck trying to get this choice using…
JohnG
  • 3
  • 3
0
votes
1 answer

How do I handle multiple returns from a function called via a PYTHON Tkinter button?

PYTHON Tkinter buttons which call a function. I have a function run from a main menu which creates a data entry form for payroll. I have a button on that form which takes the gross pay figure from the payroll form and passes it into a function to…
0
votes
0 answers

TKinter space between buttons

I am trying to make a calculator on TKinter, but for some reason, on the graphic design, I am gettin so much space between the buttons. I don't know what am I doing wrong. I want them almost together, but the space I am getting between them, it's…
Lorak
  • 33
  • 6
0
votes
0 answers

tkinter not running button/label in function

The code runs the button/label itself, but inside a for loop it seems like the variables don't update in the function until the whole thing ends. I do realize the amount of global variables I'm using is messed up but I don't know what else to…
0
votes
0 answers

tkinter - How to call a function that creates widgets (rows of data) from a different class

I want to create label widgets in the RecordsFrame class using a button in the FrameWithButton class. How do I do that? I can't just run the RecordsFrame create_column() func through the button command import customtkinter as ctk import tkinter as…
0
votes
1 answer

Is there a way to have a function that returns the argument as a string in tkinter?

import customtkinter as ctk import tkinter as tk from tkinter import ttk def get_var(input): input.get() entry_var = ctk.StringVar() entry_box = ctk.CTkEntry( root, textvariable = entry_var ).grid(row = 0, column =…
0
votes
1 answer

Tkinter canvas not updating photo

I am trying to make a photo editing app with tkinter that preforms an action to the uploaded picture on a button press(eg. flips the picture), but when the button is pressed nothing happens. The code that manipulates the picture works, I just can't…
0
votes
1 answer

How do I place my buttons inside the gray frame?

I'm trying to put my 3 buttons inside the gray frame (labeled mainframe), even though I put the parent of the buttons as the frame. import tkinter class theUI(): def __init__(self): self.root = tkinter.Tk() …
hopp hipp
  • 3
  • 1
0
votes
1 answer

Consecutive mainloop calls malfunctioning in ttkbootstrap

I was trying to design an application that gets the user input for connecting to the data base. After connecting to the database the application then gets the table that user has created based on some parameters. This has been implemented in an OO…
user350331
  • 111
  • 3
0
votes
1 answer

I am unable to add an image to a Tkinter button

I am using the following to add a button to my GUI. I am not able to get the image to display. Without specifying height or width, the button is huge but no image. Can you tell me what I am doing wrong? All of my other buttons, created similarly…
Jim Rutter
  • 45
  • 4
0
votes
0 answers

Python: highlightthicknes=0 parameter in style configuration for tkinter.ttk Button with Image, has no result

A: tk.Button with image without highlightthicknes setting B: tk.Button with image with highlightthicknes=0 C: ttk.Button with style.configure('custom.TButton', image=cross_image, highlightthickness=0) The parameter "highlightthickness" in style…
0
votes
0 answers

How to align an image and text on different sides of a button in python tkinter?

There's no spacing between the text and the image. There's only spacing between the edge of the button and the text + image I want to make a button with text on the left and an image on the right. The button is supposed to have a certain length. The…
0
votes
0 answers

I need help getting the button 'b' in my program to print out the label 'result'

I am creating a Mad Libs and I've gotten everything to work expect for the button 'b' to only show the label result when it is pushed. it instead shows it before any of the information in the texts boxes can even be put into the story. import…