Advertisement
ALEXANDAR_GEORGIEV

refueling

Jun 10th, 2023 (edited)
1,084
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.95 KB | Source Code | 0 0
  1. # refueling.py
  2. from tkinter import Label, Entry, Tk
  3.  
  4.  
  5. class Refueling:
  6.     def __init__(self):
  7.         self.fuel_form = Tk()
  8.         self.fuel_form.title("Зареждане на гориво")
  9.         screen_width = self.fuel_form.winfo_screenwidth()
  10.         screen_height = self.fuel_form.winfo_screenheight()
  11.         w, h = 800, 800
  12.         print(f"{screen_width} x {screen_height}")
  13.         self.fuel_form.geometry(f"{w}x{h}+{int(screen_width / 2 - w / 2)}+{int(screen_height / 2 - h / 2)}")
  14.         self.screen_width = self.fuel_form.winfo_screenwidth()
  15.  
  16.     def form(self):
  17.         Label(self.fuel_form, text="РВ9449АР ").grid(row=0, column=0)
  18.         Label(self.fuel_form, text="Обем на резервоара: 60 л").grid(row=1, column=0)
  19.         Label(self.fuel_form, text="Период - > Януари").grid(row=2, column=0)
  20.  
  21.  
  22.  
  23.  
  24.  
  25. if __name__ == "__main__":
  26.     test = Refueling()
  27.     test.form()
  28.  
  29.     test.fuel_form.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement