Quantcast
Channel: User martineau - Stack Overflow
Viewing all articles
Browse latest Browse all 44

Answer by martineau for left align text on setting Label width

$
0
0

You need to specify an anchor option when creating the Label widget:

from tkinter import *popup = Tk()Label(popup, text="Testing", width=25, anchor="w").grid(        row=1, column=1, sticky="w", padx=(0,10), pady=10)popup.mainloop()

Result:

Screenshot


Viewing all articles
Browse latest Browse all 44

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>