Guest User

Untitled

a guest
Jan 16th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. # Create vertical scrollbar
  2. self.scrollbar = Scrollbar(self.master, orient = VERTICAL)
  3. # Pack on the right side and fill on the Y-axis
  4. self.scrollbar.pack(side = RIGHT, fill = Y)
  5. # Create container canvas, set Y-axis scroll command to scrollbar value
  6. self.mainsection = Canvas(self.master, bg = colors["lightgray"], yscrollcommand = self.scrollbar.set)
  7. # Pack on the left side, center, fill and expand on both axes
  8. self.mainsection.pack(side = LEFT, anchor = CENTER, fill = BOTH, expand = True)
  9. # Configure the scrollbar to scroll the canvas.
  10. self.scrollbar.config(command = self.mainsection.yview)
  11.  
  12. # Widget definitions go here.
  13. self.printsectionlabel = Label(self.mainsection, text = "Print Bills")
  14. self.printsectionlabel.grid(row = 0)
  15. # More widget definitions here...
  16.  
  17. # Run after all widget definitions
  18. # Creates disabled scrollbar
  19. self.mainsection.configure(scrollregion = self.mainsection.bbox(ALL))
  20. # Prints "None"
  21. print(self.mainsection.bbox(ALL))
Add Comment
Please, Sign In to add comment