Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class WidgetsFactory:
- def __init__(self):
- self.radios = dict()
- self.m = ''
- def close_win(self, m):
- self.pop.destroy()
- self.m = m
- print('self.m: ', self.m)
- return
- def pop_message(self, win):
- self.pop = tk.Toplevel(win)
- self.pop.title("Confirmation")
- self.pop.geometry("500x200-2600+300")
- self.pop.config(bg="red")
- self.pop.attributes('-topmost', 'true')
- self.pop.wm_overrideredirect(True)
- frame = tk.Frame(self.pop)
- frame.pack(fill='both', padx=2, pady=2, expand=True)
- label_frame = tk.LabelFrame(frame, bg='lightgrey', text='избор', labelanchor='n', fg='blue',
- font=('Times', 9, 'italic'))
- label_frame.pack(fill='x', padx=1, pady=(1, 1), side='bottom')
- # TODO -> Buttons
- butt_yes = tk.Button(label_frame, text="ДА", fg='darkgreen', width=10, font=('Timesbd', 9), borderwidth=3,
- command=lambda: self.close_win('yes'))
- butt_yes.pack(pady=20, side='left', anchor='center', padx=(100, 5))
- butt_no = tk.Button(label_frame, text="НЕ", fg='red', font=('Timesbd', 9), borderwidth=3, width=10,
- command=lambda: self.close_win('no'))
- butt_no.pack(pady=20, side='right', anchor='center', padx=(5, 100))
- butt_esc = tk.Button(label_frame, text="ОТКАЗ", fg='black', font=('Timesbd', 8), borderwidth=3, width=10,
- command=lambda: self.close_win('esc'))
- butt_esc.pack(pady=20, side='left', anchor='center', padx=(25, 25))
- # TODO -> Label
- label = tk.Label(frame, text="Да се промени ли вида на аналитичните сметки\nспрямо вида на маркираните ?",
- fg="darkblue", font=('Timesbd', 12, 'italic'))
- label.pack(anchor='center', pady=30)
- self.pop.mainloop()
- return
- def get_choice(self, place_on):
- self.pop_message(place_on)
- return self.m
- # От Клас TrialBalance викам get_choice така:
- get_choice = self.widget_factory.get_choice(self.window)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement