Add library exercises

This commit is contained in:
2024-01-23 21:21:18 +01:00
parent 700c489428
commit cf745e8c8d
5 changed files with 124 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env python3
"""
Librería tkinter - Canvas() Widget
"""
import tkinter as tk
root = tk.Tk()
root.geometry("300x300")
root.title("Canvas() Widget")
# Crear un Canvas
canvas = tk.Canvas(root, width=250, height=250, bg="white")
canvas.pack(pady=20)
oval = canvas.create_oval(10, 10, 100, 100, fill="red")
rect = canvas.create_rectangle(150, 100, 240, 10, fill="blue")
line = canvas.create_line(10, 200, 100, 220, width=3, fill="green")
root.mainloop()