ScrolledFrame

class ttkwidgets.frames.ScrolledFrame(master=None, compound='right', canvasheight=400, canvaswidth=400, canvasborder=0, autohidescrollbar=True, **kwargs)[source]

Bases: ttk.Frame

A frame that sports a vertically oriented scrollbar for scrolling.

Variables:interiorttk.Frame in which to put the widgets to be scrolled with any geometry manager.
__init__(master=None, compound='right', canvasheight=400, canvaswidth=400, canvasborder=0, autohidescrollbar=True, **kwargs)[source]

Create a ScrolledFrame.

Parameters:
  • master (widget) – master widget
  • compound (str) – “right” or “left”: side the scrollbar should be on
  • canvasheight (int) – height of the internal canvas
  • canvaswidth (int) – width of the internal canvas
  • canvasborder (int) – border width of the internal canvas
  • autohidescrollbar (bool) – whether to use an AutoHideScrollbar or a ttk.Scrollbar
  • kwargs – keyword arguments passed on to the ttk.Frame initializer
resize_canvas(height=400, width=400)[source]

Function for the user to resize the internal Canvas widget if desired.

Parameters:
  • height (int) – new height in pixels
  • width (int) – new width in pixels