I am trying to create a stats frame with customtkinter, and I am running into the problem of left-justified text cutting into the border:
import customtkinter as ctk
window = ctk.CTk()
ctk.set_appearance_mode('light')
main_frame = ctk.CTkFrame(window, fg_color='white')
main_frame.pack(fill=ctk.BOTH, expand=True)
text_frame = ctk.CTkFrame(main_frame, fg_color='white', border_color='black', border_width=2)
text_frame.pack_propagate(False)
text_frame.pack(side=ctk.TOP)
# add a hello world label
hello_label = ctk.CTkLabel(text_frame, text="Hello, World!", font=('TkDefaultFont', 24), anchor='w', justify='left')
hello_label.pack(fill='x')
hello_label = ctk.CTkLabel(text_frame, text="Hello, World!", font=('TkDefaultFont', 24), anchor='w', justify='left')
hello_label.pack(fill='x')
hello_label = ctk.CTkLabel(text_frame, text="Hello, World!", font=('TkDefaultFont', 24), anchor='w', justify='left')
hello_label.pack(fill='x')
window.mainloop()
How can I draw a border around several lines of left justified text without the text cutting into the border?