Category "tkinter"

Image not Rendering in Python, Tkinter, PIL [duplicate]

PIL Photo not Rendering code : from tkinter import * from PIL import ImageTk, Image root = Tk() def resize_image(file_dir): full_dir =

Tkinter vs Linux (ubuntu/Mint) <KP_Enter> not enabled by default

On Windows the events of the 'Return' key by default are already linked to the <KP_Enter> key. For example selecting a combobox item, or closing a mesageb

Tkinter DPI bug depends on how import is entered?

I have a weird question. In essence: why does the way I enter the pyplot import line into iPython influence my plot?! Try this (on Windows 10): Use a high-DPI m

pyinstaller makes an empty black window of my tkinter gui

For a very simple example, consider the following code import tkinter as tk from tkinter import messagebox class App: def __init__(self, parent):

Change tk label text according to optionmenu

Im making a program that will do most of my homework. In compound interest, it gives a different answer than should. 5=P. R=2. 1=T The answer when compounded qu

Efficient code for custom color formatting in tkinter python

So , I was trying to create a Periodic Table and its almost done from the exterior efficiently . However , I couldn't understand if there's any way I could fill

How to add checkbuttons to every row of a table read from csv in tkinter?

I have a table with 4 columns that are read from csv and displayed using tkinter. I want to a checkbutton at the end of every row in the column called 'Served'.

tkinter executes one more time the function after using after_cancel()

So I have a button that in a cyle way execute a function as soon as the buttom is pressed down. Once released the function stops its execution. Now, for some re

RadioButtons command to change the color of the text (tkinter)

I am using tkinter for this project After inputting some radio buttons, I have managed to change the color of the background of the windows itself when clicked.

Tkinter get frame clicked

In the program bellow, I would like to get which frame is clicked, among the 3. The problem is that when I click, it is always if I was clicking on the last fra

Trying to extend this frame to the bottom but can't get it to work

I have 1 window with 2 frames inside, and i am trying to make it that the left frame (frame_side) is filled to the bottom of the screen even if you expand it. B

Bind event to click on plot in tkinter canvas

I can bind a click event to a plot (i. e. to print the coordinates that were clicked) like so: from matplotlib.backend_bases import MouseButton import matplotli

Why Is My Image Not Recognized In Python?

I wrote this code: from tkinter import * from locate import this_dir path = str(this_dir()) print(path + "\\BGnew.png") window = Tk() window.geometry("480x48

How do I align the radiobuttons to left in tkinter?

enter image description here My code shows the radiobuttons unaligned , tap picture to see, and I want to define var(1,2,3,4,5) in some better way. I am very

Unable to exit tkinter app when using "wait_variable()"

I have a python code that includes tkinter window and other running tasks. I've been trying to bind "WM_DELETE_WINDOW" event to a function that exits my python

How To Put Widgets In A New Tkinter Window?

I wanted to add widgets to a new tkinter window, so I tried this: old_window = Tk() new_window = Tk() old_window.destroy() new_window.geometry("750x550"

How do I start a timer when I click on an entry widget

I'm trying to start a timer when I click on an entry widget, but I have no clue how to do it. I've got a program that loads up a tk window, and a timer starts

Tkinter fonts are blury and pixelated

I am trying to make a GUI in Ubuntu 16.04, python 3.6 running the code using virtual environment. I have many default fonts installed on my system. No matter w

tkinter: How to avoid this ValueError: could not convert string to float: ''?

from tkinter import * root = Tk() entry = Entry(root, width=50) entry.grid() entry.grid(row=1,column=0) def ButtonClick(): userInput = entry.get() e

import _tkinter # If this fails your Python may not be configured for Tk error in python 3.8

Currently using Ubuntu 20.04 LTS with python3.8.5. Its my first time using ubuntu with absolutely no previous knowledge of terminal.SO,would love to have a deta