Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def render_gui(self):
- self.main_window = tk.Tk()
- self.main_window.geometry("1000x600")
- self.main_window.title("Damaged Text Document Virtual Restoration")
- self.main_window.resizable(True, True)
- self.main_window.configure(background="#d9d9d9")
- self.main_window.configure(highlightbackground="#d9d9d9")
- self.main_window.configure(highlightcolor="black")
- self.main_canvas = tk.Canvas(self.main_window, bg = "yellow")
- self.main_canvas.pack(expand = True, fill = "both")
- vsb = tk.Scrollbar(self.main_canvas, orient="vertical", command=self.main_canvas.yview)
- hsb = tk.Scrollbar(self.main_canvas, orient="horizontal", command=self.main_canvas.xview)
- vsb.grid(row=1, column=50,columnspan = 20, sticky='ns')
- hsb.grid(row=20, column=1,rowspan = 20,sticky = 'wes')
- self.main_canvas.configure(yscrollcommand=vsb.set,xscrollcommand=hsb.set)
- self.main_window.mainloop()
- import tkinter as tk
- class test:
- def __init__(self):
- self.render_gui()
- def render_gui(self):
- self.main_window = tk.Tk()
- self.main_window.geometry("1000x600")
- self.main_window.title("Damaged Text Document Virtual Restoration")
- self.main_window.resizable(True, True)
- self.main_window.configure(background="#d9d9d9")
- self.main_window.configure(highlightbackground="#d9d9d9")
- self.main_window.configure(highlightcolor="black")
- self.main_canvas = tk.Canvas(self.main_window, bg = "yellow")
- vsb = tk.Scrollbar(self.main_window, orient="vertical", command=self.main_canvas.yview)
- hsb = tk.Scrollbar(self.main_window, orient="horizontal", command=self.main_canvas.xview)
- hsb.pack(side = "bottom", fill = "x")
- vsb.pack(side = "right", fill = "y")
- self.main_canvas.pack(expand = True, fill = "both")
- self.main_canvas.configure(yscrollcommand=vsb.set,xscrollcommand=hsb.set)
- self.main_window.mainloop()
- t = test()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement