TKinter Tutorial
About Lesson

In this TKinter Tutorial we want to learn creating of TKinter Label,  so using label you can create and add text in your tkinter window. now this is the complete code for creating of label in python.



This is the complete code for this lesson.



in here we have used Object Oriented Programming in Python, first we have created a class, after that our class extends from TK.



For creating of the label you can use Label class and we have given the text for the label.



If you want to give font size, foreground and background for the label than you can use this code.



Also you can use layout management in tkinter, there are different layouts in tkinter, we will talk about this in the later part of the course, in here we have used grid layout, and we want to add our label in the grid layout, you need to specify the row and column in the grid.



At the end create the object of your Window class and start your main loop.




Run the complete code and this will be the result.

TKinter Tutorial - TKinter Label
TKinter Tutorial – TKinter Label