ADV-C166: DRAWING SHAPES ON CANVAS

preview_player
Показать описание
from tkinter import *
from tkinter import ttk

root = Tk()

label = Label(root, text = "Choose Color :")

canvas = Canvas(root, width = 990, height = 490, bg = "white", highlightbackground = "gray")

fill_color = ["Blue", "Green", "Red", "Yellow"]
color_dropdown = ttk.Combobox(root, state = "readonly", values = fill_color, width = 10)

coordinates_values = [10, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900]

startx = Label(root, text = "Start - X")

d1 = ttk.Combobox(root, state = "readonly", values = coordinates_values, width = 10)

starty = Label(root, text = "Start - Y")

d2 = ttk.Combobox(root, state = "readonly", values = coordinates_values, width = 10)

endx = Label(root, text = "End - X")

d3 = ttk.Combobox(root, state = "readonly", values = coordinates_values, width = 10)

endy = Label(root, text = "End - Y")

d4 = ttk.Combobox(root, state = "readonly", values = coordinates_values, width = 10)


------------------------------
By Antonio Pound
Рекомендации по теме