Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import Tk, Frame, Button, Label, Entry, LabelFrame, END, StringVar
- from tkinter.ttk import Combobox
- from Librery.ip_entry import TopFrame
- # from ttkwidgets.autocomplete import AutocompleteCombobox
- class MainFrane(Frame):
- def __init__(self, master, **kwargs):
- super().__init__(**kwargs)
- self.configure(
- background='black',
- width=kwargs['width'],
- height=kwargs['height']
- )
- self.lblInfo = Label(self, text='Данные для наименование коммутатора')
- self.lblZona = Label(self, text='Зона')
- self.lblSector = Label(self, text='Сектор')
- self._ip = TopFrame()
- self.lblStreets = Label(self, text='Улица')
- self.lblHouse = Label(self, text='Дом')
- self.lblEntry = Label(self, text='Подьезд')
- self.txtZona = Entry(self, width=5)
- self.txtSector = Entry(self, width=5)
- self.txtStreet = Entry(self, width=25)
- self.txtHouse = Entry(self, width=5)
- self.txtEntry = Entry(self, width=5)
- x_start = 5
- y_start=25
- self.lblInfo.place(x=x_start+100, y=0)
- self.lblZona.place(x=x_start, y=y_start)
- self.lblSector.place(x=x_start+80, y=y_start)
- self.lblStreets.place(x=x_start, y=y_start+30)
- self.lblHouse.place(x=x_start+220, y=y_start+30)
- self.lblEntry.place(x=x_start+300, y=y_start+30)
- self.txtZona.place(x=x_start+43, y=y_start+2)
- self.txtSector.place(x=x_start+140, y=y_start+2)
- self.txtStreet.place(x=x_start+50, y=y_start+30)
- self.txtHouse.place(x=x_start+260, y=y_start+30)
- self.txtEntry.place(x=x_start+360, y=y_start+30)
- self._ip.place(x=x_start+3, y=y_start+30)
- class MainForm(Tk):
- def __init__(self, x, y, **kwargs):
- super().__init__(**kwargs)
- self.geometry(f'{x}x{y}')
- self.resizable(width=False, height=False)
- self.frame = MainFrane(self, width=x, height=y-y/3)
- self.frame.place(x=0, y=0, )
- if __name__ == '__main__':
- root = MainForm(440,150)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement