0

I have made two windows
startscreen=tk()
and FirstScreen=tk()
I want to make a button on startscreen that opens up the window *FirstScreen
This is the code for the startscreen

startscreen=Tk()
##Photo Car##
PhotoCarRed = PhotoImage(file="D:\Python Projects\Parking Management System\Photos\Best-High-Resolution-Photos-For-Cars.png")
PlacementPhotoCarRed = Label(startscreen, image = PhotoCarRed)
PlacementPhotoCarRed.pack(side="top", fill=X )
###ToolBar on the bottom of the screen
toolbar= Frame(startscreen,bg="white")
Button1 = Button(toolbar, text="Book A Parking Space Right Now!", relief = RAISED)
Button1.pack(side="left", padx=10, pady=10)
Button2 = Button(toolbar, text="Have Your Own Parking? Register With Us!", relief = RAISED)
Button2.pack(side="left", padx=10, pady=10)
Button3 = Button(toolbar, text="Want To Cancel Your Reservation?", relief = RAISED)
Button3.pack(side="right", padx=10, pady=10)
toolbar.pack(side="bottom")

startscreen.mainloop()

And this is the code for the FirstScreen

FirstScreen = Tk()
###################
"""Size of city screen image = 720x200 px"""
WelcomePic = PhotoImage(file="D:\Python Projects\Parking Management System\Photos\CITYWALLPAPERLOWERTOOLBAR.png")
WelcomePicPlacement=Label(FirstScreen,image=WelcomePic)
WelcomePicPlacement.pack(side="top",fill="both")
######################
"""Drop Drop Menus On The Top Of The Screen"""
#######################
DropDownMenuToShowcase = Menu(FirstScreen)
FirstScreen.configure(menu=DropDownMenuToShowcase)

WhatWeDo= Menu(DropDownMenuToShowcase)
DropDownMenuToShowcase.add_cascade(label="What We Do", menu = WhatWeDo)
WhatWeDo.add_command(label="Reservations For Hotel Parking")
WhatWeDo.add_command(label="Reservations For Clubs")
WhatWeDo.add_command(label="Reservations For Events")
WhatWeDo.add_command(label="Reservations For Institutions ")
WhatWeDo.add_command(label="Reservations For Workplaces")

WhatCanYouExpect= Menu(DropDownMenuToShowcase)
DropDownMenuToShowcase.add_cascade(label="What Can You Expect From Us?", menu = WhatCanYouExpect)
WhatCanYouExpect.add_command(label="Implementation Of Our High-Class Management System")
WhatCanYouExpect.add_command(label="Valet Service For VIP Guests")
WhatCanYouExpect.add_command(label="Hassle-Free Ticket System")
WhatCanYouExpect.add_command(label="Congestion-Free Systematic Parking")

FirstScreen.mainloop()

I want to make a button which, upon clicking, makes the FirstScreen window appear.
Thank you.

Edited by Saif_6

2
Contributors
1
Reply
38
Views
1 Month
Discussion Span
Last Post by slate
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.