What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-19 17:35:06
how to create multiple windows in tkinter with button
#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 2021-10-17 07:28:10
set text entry tkinter
pythonCopyimport tkinter as tk root = tk.Tk() root.geometry("400x50") def setTextInput(text): textExample.delete(0,"end") textExample.insert(0, text) textExample = tk.Entry(root) textExample.pack() btnSet = tk.Button(root, ... Add solution -
Python 2021-10-16 17:36:09
python swap frames
from tkinter import * def raise_frame(frame): frame.tkraise() root = Tk() f1 = Frame(root) f2 = Frame(root) f3 = Frame(root) f4 = Frame(root) for frame in (f1, f2, f3, f4): frame.grid(row=0, column=0, sticky='news') Button(f1, text='Go to fra... Add solution -
Python 2021-10-15 17:57:08
Window in python
#If using tkinter import tkinter as tk from tkinter import* #Window creating root = tk.Tk() # Defining name name = "First window" # Setting window root.title(name) # IF want to use geometry So let me tell that no need of that at all # Tkinter se... Add solution -
Python 2021-10-12 05:05:08
how to make a clock usig pytohn
import sys from tkinter import * import time def times(): current_time=time.strftime("%H:%M:%S") clock.config(text=current_time) clock.after(200,times) root=Tk() root.geometry("500x250") clock=Label(root,font=("t... Add solution -
Python 2021-10-12 00:22:07
python tkinter resize window on button click
from tkinter import * root = Tk() root.title("Title") root.geometry("800x800") # Resize on button click def resize(): root.geometry("500x500") button_1 = Button(root, text="Resize", command=resize) button_1.pac... Add solution
Best helpers
Ranking is empty