Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI made in python using tkinter #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
28 changes: 28 additions & 0 deletions GUIusingtkinter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#importing tkinter which comes already installed with python
from tkinter import *
from tkinter import messagebox

#main_window is the parent or the main window
window=Tk()

#giving our gui a title
window.title("Fun GUI")

#size of minimized GUI
window.geometry('350x250')

lb=Label(window,text="Hello to my site!! Wanna see something :-> ")

lb.grid(column=0,row=0)

def buttonchecker():
messagebox.showinfo("Information","Here is my very own GUI :) ")

#B is our button,here command helps to join the function which will be executed when we click on the button
B=Button(window,text="click here",command=buttonchecker,bg="yellow")

#joined the button to our gui
B.grid(row=0,column=2)

#this command helps in opening our gui window
window.mainloop()