Skip to content

Python code snippet – How to align text in tkinter?

Label(root, text='Pack', anchor='w').pack(fill='both')
# anchor='w' ---- w  for left
# anchor='e' ---- e  for right
# anchor='center' ---- center  for center
See also  How to start an exe file in Python?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.