TomSchimansky / CustomTkinter

A modern and customizable python UI-library based on Tkinter
MIT License
10.84k stars 1.02k forks source link

align text inside textbox #2301

Open Gaeritag opened 4 months ago

Gaeritag commented 4 months ago

How can i align my text inside textbox? (justify don't works)

FaheemM1020 commented 4 months ago

Do you mean this:

import customtkinter 

root = customtkinter.CTk()

tetbox = customtkinter.CTkTextbox(root,font=("roboto",30))
tetbox.insert(index=customtkinter.END,text="Hello, World!")
tetbox.pack(padx=10,pady=10,expand=True,fill='both')

root.mainloop()
Gaeritag commented 4 months ago

Thx for your help ! But not really... I want something like this : image Note that here, i manualy put spaces to make it look like the text is centered.

FaheemM1020 commented 4 months ago

There is a padx argument for text box so there should be some way to do it