Merge pull request 'przycisk ceny mieszkan' (#5) from Interfejs_zmiany into master

Reviewed-on: s352038/SI_lab02#5
This commit is contained in:
Martyna Krzemińska 2023-10-17 18:38:50 +02:00
commit cea9e3f640

View File

@ -11,17 +11,33 @@ def output():
input_entry.delete(1, tk.END)
input_entry.insert(0, path)
top_frame = tk.Frame(master)
middle_frame = tk.Frame(master)
bottom_frame = tk.Frame(master)
line = tk.Frame(master, height=1, width=400, bg="grey80", relief='groove')
input_path = tk.Label(top_frame, text="Powierzchnia w m2:")
input_entry = tk.Entry(top_frame, text="", width=40)
def increase():
value = int(lbl_value["text"])
if value < float("inf"):
lbl_value["text"] = f"{value + 1}"
def decrease():
value = int(lbl_value["text"])
if value > 1:
lbl_value["text"] = f"{value - 1}"
input_path = tk.Label(top_frame, text="Powierzchnia w m2:")
input_entry = tk.Entry(top_frame, text = ",", width=40)
btn_entry = tk.Label(master = middle_frame, text="Liczba pokoi:")
btn_entry.pack(padx = 20)
btn_decrease = tk.Button(master=middle_frame, text="-", command=decrease)
btn_decrease.pack(padx = 20)
lbl_value = tk.Label(master=middle_frame, text="0")
lbl_value.pack(padx=20)
btn_increase = tk.Button(master=middle_frame, text="+", command=increase)
btn_increase.pack(padx=20)
input_path2 = tk.Label(middle_frame, text="Liczba pokoi:")
input_entry2 = tk.Entry(middle_frame, text="", width=40)
input_path3 = tk.Label(middle_frame, text="Czynsz:")
input_entry3 = tk.Entry(middle_frame, text="", width=40)
@ -32,7 +48,6 @@ input_entry4= tk.Entry(middle_frame, text="", width=40)
input_path5 = tk.Label(middle_frame, text="Stan:")
input_entry5= tk.Entry(middle_frame, text="", width=40)
begin_button = tk.Button(bottom_frame, text='Oblicz')
output_path = tk.Label(bottom_frame, text="Prognozowana cena:")
@ -47,9 +62,6 @@ middle_frame.pack(side=tk.TOP)
input_path.pack(pady=5)
input_entry.pack(pady=5)
input_path2.pack(pady=5)
input_entry2.pack(pady=5)
input_path3.pack(pady=5)
input_entry3.pack(pady=5)