Answers for "tkinter how to alighn text"

4

how to rezize image in python tkinter

from tkinter import *
from PIL import ImageTk, Image
root=Tk()

image = Image.open('path_to_your_image.png')
# The (450, 350) is (height, width)
image = image.resize((450, 350), Image.ANTIALIAS)
my_img = ImageTk.PhotoImage(image)
my_img = Label(image = my_img)
my_img.pack()

root.mainloop()
Posted by: Guest on May-05-2020
3

tkinter text in canvas

self.canvas = Canvas(root, width=800, height=650, bg = '#afeeee')
self.canvas.create_text(100,10,fill="darkblue",font="Times 20 italic bold",
                        text="Click the bubbles that are multiples of two.")
Posted by: Guest on May-06-2020

Python Answers by Framework

Browse Popular Code Answers by Language