Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- import math
- root = Tk()
- root.title('Солнечная система')
- root.geometry('1020x650')
- bg = Canvas(root, width = 1020, height= 650, bg = 'lightgrey')
- bg.pack()
- def clicked():
- aEarth = test.get() #get password from entry
- print(aEarth)
- test = StringVar()
- test_entry = Entry(textvariable=test, bg = 'gray', bd = 5 )
- test_entry.place(relx=0.22, rely=0.0264)
- testtext_label = Label(text="Введите большую полуось земли:", bg = 'lightgrey', bd = 5)
- testtext_label.place(relx=0.019, rely=0.025)
- acceptButton = Button(root, text="Принять", command=clicked)
- acceptButton.place(relx=0.367, rely=0.0266, width = 120)
- bg.create_rectangle(10,10,500,100, fill ='white')
- bg.create_rectangle(10,120,1010,620, fill ='white')
- for y in range(66):
- k = 25 * y
- bg.create_line(35+k, 120, 35+k, 620, width=0.5,fill ='lightgrey')
- for x in range(21):
- k = 25 * x
- bg.create_line(10, 120+k, 1010, 120+k, width=0.5,fill ='lightgrey')
- bg.create_line(10,120,1010,120, fill ='black')
- bg.create_line(10,620,1010,620, fill ='black')
- bg.create_line(10,120,10,620, fill ='black')
- bg.create_line(1010,120,1010,620, fill ='black')
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement