51 lines
1.8 KiB
Python
51 lines
1.8 KiB
Python
from tkinter import *
|
|
|
|
root = Tk()
|
|
|
|
root.geometry("500x500")
|
|
root.title("Mieszkaneo")
|
|
|
|
root.maxsize(900, 600)
|
|
root.config(bg="#C3DEED")
|
|
|
|
label1 = Label(root, text="Metraż", font=('Arial', 18))
|
|
label1.grid(row=0, column=0, padx=10, pady=5)
|
|
entry1 = Entry(root, font=('Arial', 18))
|
|
entry1.grid(row=1, column=0, padx=10, pady=5)
|
|
|
|
label2 = Label(root, text="Rynek", font=('Arial', 18))
|
|
label2.grid(row=0, column=1, padx=10, pady=5)
|
|
rynek_options = ["Pierwotny", "Wtórny"]
|
|
selected_rynek = StringVar()
|
|
selected_rynek.set(rynek_options[0])
|
|
|
|
rynek_menu = OptionMenu(root, selected_rynek, *rynek_options)
|
|
rynek_menu.config(font=('Arial', 18), bg='white', fg='black') # Kolory tła i tekstu
|
|
rynek_menu.grid(row=1, column=1, padx=10, pady=5)
|
|
|
|
label3 = Label(root, text="Stan", font=('Arial', 18))
|
|
label3.grid(row=2, column=0, padx=10, pady=5)
|
|
stan_options = ["Do remontu", "Wykończone"]
|
|
selected_stan = StringVar()
|
|
selected_stan.set(stan_options[0])
|
|
|
|
stan_menu = OptionMenu(root, selected_stan, *stan_options)
|
|
stan_menu.config(font=('Arial', 18), bg='white', fg='black') # Kolory tła i tekstu
|
|
stan_menu.grid(row=3, column=0, padx=10, pady=5)
|
|
|
|
label4 = Label(root, text="Liczba Pokoi", font=('Arial', 18))
|
|
label4.grid(row=2, column=1, padx=10, pady=5)
|
|
liczba_pokoi_options = [str(i) for i in range(1, 5)]
|
|
selected_liczba_pokoi = StringVar()
|
|
selected_liczba_pokoi.set(liczba_pokoi_options[0])
|
|
|
|
liczba_pokoi_menu = OptionMenu(root, selected_liczba_pokoi, *liczba_pokoi_options)
|
|
liczba_pokoi_menu.config(font=('Arial', 18), bg='white', fg='black') # Kolory tła i tekstu
|
|
liczba_pokoi_menu.grid(row=3, column=1, padx=10, pady=5)
|
|
|
|
button = Button(root, text="Oblicz cenę mieszkania", font=('Arial', 18))
|
|
button.config(bg='green', fg='white') # Kolory tła i tekstu
|
|
button.grid(row=4, columnspan=2, padx=10, pady=10)
|
|
|
|
root.mainloop()
|