質問編集履歴
1
self.canvas.configureの無駄な処理を消しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
|
29
29
|
self.list_height = 200
|
30
30
|
|
31
|
-
self.canvas = Canvas(self.frame, width=
|
31
|
+
self.canvas = Canvas(self.frame, width=180, height=200, bg='white', bd=4)
|
32
32
|
self.frame_ch = Frame(self.canvas, width=180, height=self.list_height)
|
33
33
|
self.scrollbar = Scrollbar(self.frame, orient="vertical", \
|
34
34
|
command=self.canvas.yview)
|
@@ -47,8 +47,7 @@
|
|
47
47
|
|
48
48
|
|
49
49
|
def canvas_config(self, event):
|
50
|
-
self.canvas.configure(scrollregion=self.canvas.bbox("all"),
|
50
|
+
self.canvas.configure(scrollregion=self.canvas.bbox("all"), height=self.list_height)
|
51
|
-
height=self.list_height)
|
52
51
|
|
53
52
|
root = Tk()
|
54
53
|
t = TestScroll(root)
|