Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

add text to the middle of the window tkinter

import tkinter

window = tkinter.Tk()       # creating the window object
window.title('my first GUI program')
window.minsize(width=600, height=500)

# label 
# adding text to the middle of the window
my_label = tkinter.Label(text='I am a Label')
my_label.pack()

window.mainloop()           # keeping the window until we close it
Comment

PREVIOUS NEXT
Code Example
Python :: append element to an array python 
Python :: python datetime from string 
Python :: global keyword python 
Python :: how to playsound in python 
Python :: python file location path 
Python :: unnamed 0 pandas 
Python :: python palindrome string 
Python :: set cookie in python requests 
Python :: How do you find the missing number in a given integer array of 1 to 100? 
Python :: sort list in python by substring 
Python :: add colorbar to figure matplotlib line plots 
Python :: label encoding column pandas 
Python :: pandas to_csv no index 
Python :: invert a dictionary python 
Python :: pytest loop 
Python :: python empty text file 
Python :: matplotlib turn off ticks 
Python :: merge dataframe 
Python :: generic python 
Python :: replace a string in a list 
Python :: python process memory usage 
Python :: python day of the week 
Python :: Python DateTime add days to DateTime object 
Python :: tkinter keep window in front 
Python :: plot histogram in seaborn 
Python :: remove particular row number in pandas 
Python :: check pandas version 
Python :: how to write a file in python 
Python :: string to list separated by space python 
Python :: how to enable execution time in jupyter lab 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =