MCPcopy Index your code
hub / github.com/secdev/scapy / __init__

Method __init__

scapy/modules/ticketer.py:379–399  ·  view source on GitHub ↗
(self, parent)

Source from the content-addressed store, hash-verified

377
378 class ScrollFrame(tk.Frame):
379 def __init__(self, parent):
380 super().__init__(parent)
381
382 self.canvas = tk.Canvas(self, borderwidth=0)
383 self.viewPort = ttk.Frame(self.canvas)
384 self.vsb = tk.Scrollbar(self, orient="vertical", command=self.canvas.yview)
385 self.canvas.configure(yscrollcommand=self.vsb.set)
386
387 self.vsb.pack(side="right", fill="y")
388 self.canvas.pack(side="left", fill="both", expand=True)
389 self.canvas_window = self.canvas.create_window(
390 (4, 4), window=self.viewPort, anchor="nw", tags="self.viewPort"
391 )
392
393 self.viewPort.bind("<Configure>", self.onFrameConfigure)
394 self.canvas.bind("<Configure>", self.onCanvasConfigure)
395
396 self.viewPort.bind("<Enter>", self.onEnter)
397 self.viewPort.bind("<Leave>", self.onLeave)
398
399 self.onFrameConfigure(None)
400
401 def onFrameConfigure(self, event):
402 """Reset the scroll region to encompass the inner frame"""

Callers

nothing calls this directly

Calls 4

onFrameConfigureMethod · 0.95
configureMethod · 0.80
__init__Method · 0.45
bindMethod · 0.45

Tested by

no test coverage detected