Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions WeatherApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_weather(city):
canvas = tk.Canvas(root, height=HEIGHT, width=WIDTH)
canvas.pack()

background_image = tk.PhotoImage(file='landscape.png')
background_image = tk.PhotoImage(file='landscape.png',master=root)
background_label = tk.Label(root, image=background_image)
background_label.place(relwidth=1, relheight=1)

Expand All @@ -57,4 +57,4 @@ def get_weather(city):
label = tk.Label(lower_frame)
label.place(relwidth=1, relheight=1)

root.mainloop()
root.mainloop()
4 changes: 2 additions & 2 deletions WeatherApp_withicons.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def open_image(icon):
weather_icon.image = img

C = tk.Canvas(app, height=HEIGHT, width=WIDTH)
background_image= tk.PhotoImage(file='./landscape.png')
background_image= tk.PhotoImage(file='./landscape.png',master=app)
background_label = tk.Label(app, image=background_image)
background_label.place(x=0, y=0, relwidth=1, relheight=1)

Expand Down Expand Up @@ -73,4 +73,4 @@ def open_image(icon):



app.mainloop()
app.mainloop()