Advertisement
snowden_web

Untitled

Sep 27th, 2019
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.57 KB | None | 0 0
  1. from tkinter import *
  2. import random
  3.  
  4. root = Tk()
  5. root.resizable(width=False, height=False)
  6. root.title("Название")
  7. root.geometry("640x420+300+300")
  8. calculated_text = Text(root,height=20, width=77)
  9.  
  10.  
  11. def erase():  
  12.     calculated_text.delete('1.0', END)
  13.  
  14. def timetable():
  15.     pass
  16.  
  17.  
  18. var = IntVar()
  19. var.set(0)
  20. r1 = Radiobutton(root, text='', width=15, height=1, indicatoron=0, variable=var, value=0, command=timetable)
  21. r2 = Radiobutton(root, text='', width=15, height=1, indicatoron=0, variable=var, value=1,  command=timetable)
  22. r3 = Radiobutton(root, text='', width=15, height=1, indicatoron=0, variable=var, value=2,  command=timetable)
  23. r4 = Radiobutton(root, text='', width=15, height=1, indicatoron=0, variable=var, value=3,  command=timetable)
  24. r5 = Radiobutton(root, text='', width=15, height=1, indicatoron=0, variable=var, value=4,  command=timetable)
  25. r6 = Radiobutton(root, text='', width=15, height=1, indicatoron=0, variable=var, value=5,  command=timetable)
  26.  
  27. r1.grid(row=1,column=0, padx=1, pady=5)
  28. r2.grid(row=1,column=1, padx=1, pady=5)
  29. r3.grid(row=1,column=2, padx=1, pady=5)
  30. r4.grid(row=2,column=0, padx=1, pady=5)
  31. r5.grid(row=2,column=1, padx=1, pady=5)
  32. r6.grid(row=2,column=2, padx=1, pady=5)
  33.  
  34.    
  35. day_label = Label(text="    Вдн", font="Arial 14")
  36. day_label.grid(row=0, column=1, sticky="w")
  37.  
  38. calculated_text.grid(row=4, column=0, sticky='nsew', columnspan=3)
  39.  
  40. scrollb = Scrollbar(root, command=calculated_text.yview)
  41. scrollb.grid(row=5, column=4, sticky='nsew')
  42. calculated_text.configure(yscrollcommand=scrollb.set)
  43.  
  44. root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement