-
Notifications
You must be signed in to change notification settings - Fork 1
/
DIsplay_places.py
67 lines (49 loc) · 2.58 KB
/
DIsplay_places.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
from tkinter import *
import webbrowser
import tkinter as tk
from PIL import ImageTk
root = Tk()
root.title("PLACES TO VISIT")
root.geometry("900x1000")
def openfile1():
with open("/home/nidhi/Documents/Tourist_Guide/marineDrive.txt", "r") as f:
Message(root, text=f.read()).pack()
def openfile2():
with open("/home/nidhi/Documents/Tourist_Guide/GateWayOfIndia.txt", "r") as f:
Message(root, text=f.read()).pack()
def openfile3():
with open("/home/nidhi/Documents/Tourist_Guide/HajiAliDargah.txt", "r") as f:
Message(root, text=f.read()).pack()
def openfile4():
with open("/home/nidhi/Documents/Tourist_Guide/sanjayGandhi.txt", "r") as f:
Message(root, text=f.read()).pack()
def openfile5():
with open("/home/nidhi/Documents/Tourist_Guide/kanheriCaves.txt", "r") as f:
Message(root, text=f.read()).pack()
bg_icon = ImageTk.PhotoImage(file='/home/nidhi/Documents/python mini project/login.jpg')
bg_lbl = Label(root, image=bg_icon).pack()
title = Label(root, text="PLACES TO VISIT IN MUMBAI", font=("times new roman", 40, "bold"),
bg="light blue", bd=10, relief=GROOVE)
title.place(x=0, y=0, relwidth=1)
p1 = PhotoImage(file='/home/nidhi/Documents/python mini project/marine.png')
p2 = PhotoImage(file='/home/nidhi/Documents/python mini project/gateway.png')
p3 = PhotoImage(file='/home/nidhi/Documents/python mini project/hajiali.png')
p4 = PhotoImage(file='/home/nidhi/Documents/python mini project/sanjaypark.png')
p5 = PhotoImage(file='/home/nidhi/Documents/python mini project/kanheri.png')
btn_1 = tk.Button(root, text="MARINE DRIVE", image=p1, compound=LEFT, command=openfile1,
font=("times new roman", 20, "bold"), bg="dark blue", fg="white")
btn_1.place(x=50, y=100)
btn_2 = tk.Button(root, text="GATE WAY OF INDIA", image=p2, compound=LEFT, command=openfile2,
font=("times new roman", 20, "bold"), bg="dark blue", fg="white")
btn_2.place(x=50, y=290)
btn_3 = tk.Button(root, text="HAJI ALI DARGAH", image=p3, compound=LEFT, command=openfile3,
font=("times new roman", 20, "bold"), bg="dark blue", fg="white")
btn_3.place(x=50, y=460)
btn_4 = tk.Button(root, text="SANJAY GANDHI NATIONAL PARK", image=p4, compound=LEFT, command=openfile4,
font=('times new roman', 20, "bold"), bg="dark blue", fg="white")
btn_4.place(x=50, y=640)
btn_5 = tk.Button(root, text="KANHERI CAVES", image=p5, compound=LEFT, command=openfile5,
font=("times new roman", 20, "bold"), bg="dark blue", fg="white")
btn_5.place(x=50, y=830)
root.resizable(False, False)
root.mainloop()