From 2cc87a78b00c6c331b4ed31a13d3b17835b3ed90 Mon Sep 17 00:00:00 2001 From: 10doshi12 <72262399+10doshi12@users.noreply.github.com> Date: Fri, 2 Oct 2020 19:16:18 +0530 Subject: [PATCH] Update WeatherApp.py --- WeatherApp.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/WeatherApp.py b/WeatherApp.py index 467d3c9..7c619b3 100644 --- a/WeatherApp.py +++ b/WeatherApp.py @@ -1,4 +1,5 @@ import tkinter as tk +from tkinter import ttk import requests HEIGHT = 500 @@ -48,7 +49,8 @@ def get_weather(city): entry = tk.Entry(frame, font=40) entry.place(relwidth=0.65, relheight=1) -button = tk.Button(frame, text="Get Weather", font=40, command=lambda: get_weather(entry.get())) +# ttk buttoms look more cool +button = ttk.Button(frame, text="Get Weather", font=40, command=lambda: get_weather(entry.get())) button.place(relx=0.7, relheight=1, relwidth=0.3) lower_frame = tk.Frame(root, bg='#80c1ff', bd=10) @@ -57,4 +59,4 @@ def get_weather(city): label = tk.Label(lower_frame) label.place(relwidth=1, relheight=1) -root.mainloop() \ No newline at end of file +root.mainloop()