How do I left-justify the information in the labels?
Steve
Gronicus at SGA.Ninja
Sun Aug 30 11:24:37 EDT 2020
It turned out to be "sticky=tk.W" instead of "sticky=tkinter.w"
Probably because I have "import tkinter as tk"
It does work though.
Mischief Managed....
Steve
FootNote:
If money does not grow on trees, then why do banks have branches?
-----Original Message-----
From: Python-list <python-list-bounces+gronicus=sga.ninja at python.org> On
Behalf Of Peter Otten
Sent: Sunday, August 30, 2020 10:32 AM
To: python-list at python.org
Subject: Re: How do I left-justify the information in the labels?
Steve wrote:
> How do I left-justify the information in the labels?
> SVRlabel = ttk.Label(window, text = SpecLine + " "*5)
> SVRlabel.grid(column = 1, row = x)
The text in the labels already is left-justified -- but the labels
themselves are centered inside the grid cells.
You can change that with
label = ttk.Label(window, text=SpecLine) label.grid(column=1, row=x,
sticky=tkinter.W) # W for "west"
See https://tkdocs.com/shipman/grid.html.
--
https://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list