Skip to content

Commit b16cffc

Browse files
author
Aditya
committed
Minor updates to comments
1 parent 20d5b44 commit b16cffc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/program3.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ def __init__(self, master): # constructor method
2424

2525
# store image in the label obj to keep it in the scope as
2626
# 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
3131

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
3333
self.btn.pack()
3434

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)
3737
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)
3939

4040
def handle_text(self):
4141
if self.label['text'] == self.greet_list[0]:

0 commit comments

Comments
 (0)