Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # refueling.py
- from tkinter import Label, Entry, Tk
- class Refueling:
- def __init__(self):
- self.fuel_form = Tk()
- self.fuel_form.title("Зареждане на гориво")
- screen_width = self.fuel_form.winfo_screenwidth()
- screen_height = self.fuel_form.winfo_screenheight()
- w, h = 800, 800
- print(f"{screen_width} x {screen_height}")
- self.fuel_form.geometry(f"{w}x{h}+{int(screen_width / 2 - w / 2)}+{int(screen_height / 2 - h / 2)}")
- self.screen_width = self.fuel_form.winfo_screenwidth()
- def form(self):
- Label(self.fuel_form, text="РВ9449АР ").grid(row=0, column=0)
- Label(self.fuel_form, text="Обем на резервоара: 60 л").grid(row=1, column=0)
- Label(self.fuel_form, text="Период - > Януари").grid(row=2, column=0)
- if __name__ == "__main__":
- test = Refueling()
- test.form()
- test.fuel_form.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement