MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / TkFixedFrame

Class TkFixedFrame

PySimpleGUI/PySimpleGUI.py:8010–8037  ·  view source on GitHub ↗

A tkinter frame that is used with Column Elements that do not have a scrollbar

Source from the content-addressed store, hash-verified

8008# TkFixedFrame (Used by Column) #
8009# ---------------------------------------------------------------------- #
8010class TkFixedFrame(tk.Frame):
8011 """
8012 A tkinter frame that is used with Column Elements that do not have a scrollbar
8013 """
8014
8015 def __init__(self, master, **kwargs):
8016 """
8017 :param master: The parent widget
8018 :type master: (tk.Widget)
8019 :param **kwargs: The keyword args
8020 :type **kwargs:
8021 """
8022 tk.Frame.__init__(self, master, **kwargs)
8023
8024 self.canvas = tk.Canvas(self)
8025
8026 self.canvas.pack(side="left", fill="both", expand=True)
8027
8028 # reset the view
8029 self.canvas.xview_moveto(0)
8030 self.canvas.yview_moveto(0)
8031
8032 # create a frame inside the canvas which will be scrolled with it
8033 self.TKFrame = tk.Frame(self.canvas, **kwargs)
8034 self.frame_id = self.canvas.create_window(0, 0, window=self.TKFrame, anchor="nw")
8035 self.canvas.config(borderwidth=0, highlightthickness=0)
8036 self.TKFrame.config(borderwidth=0, highlightthickness=0)
8037 self.config(borderwidth=0, highlightthickness=0)
8038
8039
8040# ---------------------------------------------------------------------- #

Callers 1

PackFormIntoFrameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected