This commit is contained in:
2023-06-17 21:30:45 +03:00
parent 334d3c733f
commit fa2759bf1c
2 changed files with 113 additions and 10 deletions

76
main.py
View File

@@ -54,7 +54,7 @@ def options():
window.title("Настройки")
window.config(bg="#5D6D7E")
lbl1=Label(window,text="Выбирите таблицу",font=("",25),fg="#fed9b7",bg="#5D6D7E")
lbl1=Label(window,text="Измените настройки программы",font=("",25),fg="#fed9b7",bg="#5D6D7E")
lbl1.pack(anchor="center")
bo1=Button(window,text="1. Добавить должность",command=addDolgnostGui)
@@ -411,9 +411,9 @@ def addPrintSettingsGui():
prDataFrame.heading(col,text=value)
#bapg=Button(window,text="Добавить",command=lambda:getPrintSetings())
#
"""
#bapg=Button(window,text="Добавить",command=lambda:getPrintSetings())
window.mainloop()
@@ -619,6 +619,74 @@ def editUsers():
root.mainloop()
def ShowOptimalSettingsGui():
root = Tk()
root.title(" ")
root.geometry("700x500")
root.config(bg="#5D6D7E")
l2 = Label(root,bg="#5D6D7E",text="Выберите принтер")
l2.place(x=10, y=20)
prnt = ttk.Combobox(root,textvariable="123", values=['Ender3', 'Kossel Delta'])
prnt.place(x=150, y=20)
l2 = Label(root,bg="#5D6D7E",text="Выберите произв")
l2.place(x=10, y=60)
prnt2 = ttk.Combobox(root,textvariable="1123", values=['Fdplast', 'Filamentarno'])
prnt2.place(x=150, y=60)
l3 = Label(root,bg="#5D6D7E",text="Выберите Тип пластика")
l3.place(x=10, y=100)
prnt3 = ttk.Combobox(root,textvariable="11234", values=['pla', 'petg', 'abs'])
prnt3.place(x=150, y=100)
l2 = Label(root,bg="#5D6D7E",text="Выберите цвет")
l2.place(x=10, y=140)
prnt4 = ttk.Combobox(root,textvariable="1", values=['Голубой', 'Зелёгый'])
prnt4.place(x=150, y=140)
chc=ttk.Checkbutton(root,text="Выбрать оптимальные?")
chc.place(x=100, y=170)
# определяем данные для отображения
people = [(209, 58, "57мм/cек", " "), (223, 75, "45мм/cек", "Проба прочности"), (211, 55, "57мм/cек", "Хорошая поверхность")]
people2 = [(211, 59, "62мм/cек")]
# определяем столбцы
columns = ("tempSopl", "tempStol", "Speed", "addit")
tree = ttk.Treeview(columns=columns, show="headings")
tree.place( x=10, y=220)
button_add = Button(root, text="Показать")
button_add.place(x=10, y=170)
# определяем заголовки с выпавниваем по левому краю
tree.heading("tempSopl", text="Температура сопла", anchor=W)
tree.heading("tempStol", text="Температура стола", anchor=W)
tree.heading("Speed", text="Скорость печати", anchor=W)
tree.heading("addit", text="Примечание", anchor=W)
# настраиваем столбцы
tree.column("#1", stretch=NO, width=200)
tree.column("#2", stretch=NO, width=200)
tree.column("#3", stretch=NO, width=200)
tree.column("#4", stretch=NO, width=200)
# добавляем данные
for person in people:
tree.insert("", END, values=person)
root.mainloop()
if __name__ == '__main__':
editUsers()
ShowOptimalSettingsGui()