Python Tkinter - Creating Labels and Styling - Part 1

preview_player
Показать описание
In this beginner tkinter tutorial I will explain how one can add labels into the GUI program and create a generic template using the Style class embedded inside of the ttk module.

This video will explain the following concepts:
1 - Generic use for Labels inside of a GUI app
2 - How to create a very basic Label (parent and text value)
3 - How to use geometry management to influence the look of your label in its container.

4 - The strategy behind having a generic styling template (using the Style class object in Tkinter) combined with more precise styling argument contained in the Label class (part 2)

5- Creating a styling template with :
1 - The Background color
2 - A generic font for all your labels ('font name', size, 'bold/italic')
3 - The foreground color of your text (color)
4 - The padding of your text inside your Label

Thank you for watching ! :)
Рекомендации по теме
Комментарии
Автор

Your Tkinter tutorials are the best in Youtube and the easiest to understand. Thank you for this great content.

spanglishpython
Автор

Hello ! Thank you for this amazing tutorial.
To center the text in the label, just add this in the label style :
s.configure('Label.TLabel', ...., ...., ...., anchor='center')

dylanleite