Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- alph = ['A', 'B', 'C', 'D', 'E', 'F']
- root = Tk()
- button_var = {}
- i = 0
- def ins():
- global button_var, i
- button_var[i] = Entry(root, width=30)
- tes_create.grid(row=i+8, column=1)
- button_var[i].grid(row=i+7, column=1)
- i = i + 1
- test = open(r'D:\test.txt', 'w')
- name_test_label = Label(root,
- text='Введите название теста:',
- width=25, height=2,
- fg='black')
- name_test_read = Entry(root,
- width=30)
- q_read = Entry(root, width=30)
- tes_question = Label(root, text='Введите вопрос', width=25, height=2)
- variant = Label(root, text='Введите вариант ответа', width=25, height=2)
- tes_variant_read = Entry(root, width=30)
- tes_give_var = Button(root, text='Добавить вариант', width=15, height=1, command=ins)
- give_quest = Button(root, text='Добавить вопрос', width=15, height=1)
- tes_create = Button(root, text='Создать вопрос', width=12, height=1)
- name_test_label.grid(row=1, column=1)
- name_test_read.grid(row=2, column=1)
- tes_question.grid(row=3, column=1)
- q_read.grid(row=4, column=1)
- give_quest.grid(row=4, column=2)
- variant.grid(row=5, column=1)
- tes_variant_read.grid(row=6, column=1)
- tes_give_var.grid(row=6, column=2)
- tes_create.grid(row=7, column=1)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement