What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-16 12:25:11
python hoe to make a text box
import tkinter as tk root= tk.Tk() canvas1 = tk.Canvas(root, width = 400, height = 300, relief = 'raised') canvas1.pack() label1 = tk.Label(root, text='Calculate the Square Root') label1.config(font=('helvetica', 14)) canvas1.create_window(200, 25, wi... Add solution -
Python 2022-02-20 07:10:07
change the color of the button on hovering tkinter
import tkinter as tk def on_enter(e): myButton['background'] = 'green' def on_leave(e): myButton['background'] = 'SystemButtonFace' root = tk.Tk() myButton = tk.Button(root,text="Click Me") myButton.grid() myButton.bind("<En... Add solution -
Python 2022-01-31 20:22:02
can tkinter have multiple windows open?
#import module needed import tkinter as tk #write the new window function which #will be called when button pressed def new_window(): window = tk.Toplevel(root) canvas = tk.Canvas(window, height=HEIGHT, width=WIDTH) canvas.pack() HEIGHT = 400... Add solution -
Python 2022-01-29 09:26:37
k-means
import tkinter as tk from tkinter import filedialog import pandas as pd from pandas import DataFrame import matplotlib.pyplot as plt from sklearn.cluster import KMeans from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg root= tk.Tk() canvas1... Add solution -
Other 2021-12-23 17:22:22
tkinter trig calculator
import tkinter as tk from tkinter import ttk window = tk.Tk() v = tk.IntVar() v.set(1) x1String = "x1: " x2String = "x2: " y1String = "y1: " y2String = "y2: " window.geometry("640x860") submit = tk.Bu... Add solution -
Python 2021-11-20 21:49:14
Python Tkinter timer animation
#!/usr/bin/env python3 # Display UTC. # started with https://docs.python.org/3.4/library/tkinter.html#module-tkinter import tkinter as tk import time def current_iso8601(): """Get current date and time in ISO8601""" ... Add solution