Created
January 8, 2019 17:15
-
-
Save blndev/3ee4d0b534b91f9fed6dcb837d51bec6 to your computer and use it in GitHub Desktop.
Simple "Hello World" Dialog for Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tkinter #in python 3.x: tkinter wird kleingeschrieben | |
window = tkinter.Tk() | |
window.title("TK Sample") | |
window.geometry("400x100") | |
frame = tkinter.Frame(window, relief="ridge", borderwidth=2) | |
frame.pack(fill="both",expand=1) | |
label = tkinter.Label(frame, text="Hello World!") | |
label.pack(expand=1) | |
button = tkinter.Button(frame,text="OK",command=window.destroy) | |
button.pack(side="bottom") | |
window.mainloop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment