Answers for "python tkinter application"

6

how to create a tkinter window

#Creating Tkinter Window In Python:

from tkinter import *

new_window = Tk() #Create a window ; spaces should be denoted with underscores ; every window should have a different name
new_window.title("My Python Project") #Name of screen ; name should be the one which you already declared (new_window)
new_window.geometry("200x150") #Resizes the default window size
new_window.configure(bg = "red") #Gives color to the background

new_window.mainloop() #Shows the window on the screen
Posted by: Guest on November-07-2020
5

basic tkinter gui

import tkinter as tk
root = tk.Tk()
root.title("my title")
root.geometry('200x150')
root.configure(background='black')

#	enter widgets here

root.mainloop()
Posted by: Guest on July-10-2020
0

tkinter simple application

#simple application with tkinter

from tkinter import *
window=Tk()
# add widgets here

window.title('Hello Python')
window.geometry("300x200+10+20")
window.mainloop()
Posted by: Guest on June-02-2021

Code answers related to "python tkinter application"

Python Answers by Framework

Browse Popular Code Answers by Language