Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Create vertical scrollbar
- self.scrollbar = Scrollbar(self.master, orient = VERTICAL)
- # Pack on the right side and fill on the Y-axis
- self.scrollbar.pack(side = RIGHT, fill = Y)
- # Create container canvas, set Y-axis scroll command to scrollbar value
- self.mainsection = Canvas(self.master, bg = colors["lightgray"], yscrollcommand = self.scrollbar.set)
- # Pack on the left side, center, fill and expand on both axes
- self.mainsection.pack(side = LEFT, anchor = CENTER, fill = BOTH, expand = True)
- # Configure the scrollbar to scroll the canvas.
- self.scrollbar.config(command = self.mainsection.yview)
- # Widget definitions go here.
- self.printsectionlabel = Label(self.mainsection, text = "Print Bills")
- self.printsectionlabel.grid(row = 0)
- # More widget definitions here...
- # Run after all widget definitions
- # Creates disabled scrollbar
- self.mainsection.configure(scrollregion = self.mainsection.bbox(ALL))
- # Prints "None"
- print(self.mainsection.bbox(ALL))
Add Comment
Please, Sign In to add comment