Update ctk_textbox.py

fix customtkinter.CTkTextbox().get()  Append extra characters ("\n") to the end after obtaining the content.
This commit is contained in:
Neoshui
2023-05-14 14:41:00 +08:00
committed by GitHub
parent 1960c0b1e0
commit 679a6c1511

View File

@@ -352,7 +352,7 @@ class CTkTextbox(CTkBaseClass):
return self._textbox.insert(index, text, tags)
def get(self, index1, index2=None):
return self._textbox.get(index1, index2)
return self._textbox.get(index1, index2).replace('\n', '', -1)
def bbox(self, index):
return self._textbox.bbox(index)