I'm currently using Customtkinter and encountering an issue with horizontally centering text within a CTkTextbox. Here is a snippet of my code:
textbox = customtkinter.CTkTextbox(master=self.createLoginFrame.loginFrame, width=loginFrame_width/1.2, height=loginFrame_height/6)
textbox.configure(padx=textbox.winfo_reqwidth() / 2)
textbox.grid(row=0, column=0)
With this setup, the text initially starts typing from the center of the textbox, which is my goal. However, the issue occurs when typing subsequent characters; after typing one character, the text moves to a new line instead of continuing horizontally centered.
I believe the padx setting is affecting both the left and right sides of the textbox, causing this issue. Is there a way to dynamically keep the text horizontally centered after each character is typed, rather than it moving to a new line?
Any suggestions or alternative methods to achieve this in Customtkinter would be highly appreciated. Thank you!
Here is a screenshot showing the current issue, with text jumping lines after each character:

padxto something more reasonable.justify="center"set as one of the options.event.charexists. If it does, insert the new character, usetag_removeto remove your tag, and then usetag_addto apply the tag to the beginning up to the NEW end. Follow up by returning "break" to suppress normal keypress behavior. I would have given you a real answer but I'm not typing up a code example on my phone, which is all I have ATM.