@@ -24,18 +24,18 @@ def __init__(self, master): # constructor method
24
24
25
25
# store image in the label obj to keep it in the scope as
26
26
# long as label is displayed and to avoid getting the image getting garbage collected
27
- imgpath = 'simple_gif.gif' # path of the image
28
- self .label .img = tk .PhotoImage (file = imgpath ) # read_image :: saving image within label_object to prevent its garbage collection
29
- self .label .config (image = self .label .img ) # display image in label widget
30
- self .label .config (compound = 'left' ) # to display image in left of text
27
+ imgpath = 'simple_gif.gif' # path of the image
28
+ self .label .img = tk .PhotoImage (file = imgpath ) # read_image :: saving image within label_object to prevent its garbage collection
29
+ self .label .config (image = self .label .img ) # display image in label widget
30
+ self .label .config (compound = 'left' ) # to display image in left of text
31
31
32
- self .label .pack () # pack label to the window with pack() geometry method of Label
32
+ self .label .pack () # pack label to the window with pack() geometry method of Label
33
33
self .btn .pack ()
34
34
35
- self .label .config (wraplength = 200 ) # specify wraplength of text in label
36
- self .label .config (justify = tk .CENTER ) # justify text in label to (CENTER, RIGHT or LEFT)
35
+ self .label .config (wraplength = 200 ) # specify wraplength of text in label
36
+ self .label .config (justify = tk .CENTER ) # justify text in label to (CENTER, RIGHT or LEFT)
37
37
self .label .config (foreground = 'blue' , background = 'yellow' ) # insert font color (foreground) and background color
38
- self .label .config (font = ('Times' , 10 , 'bold' )) # font = (font_name, font_size, font_type)
38
+ self .label .config (font = ('Times' , 10 , 'bold' )) # font = (font_name, font_size, font_type)
39
39
40
40
def handle_text (self ):
41
41
if self .label ['text' ] == self .greet_list [0 ]:
0 commit comments