From 679a6c151122f19b59bbe0cf2d05d15aaae20922 Mon Sep 17 00:00:00 2001 From: Neoshui Date: Sun, 14 May 2023 14:41:00 +0800 Subject: [PATCH] Update ctk_textbox.py fix customtkinter.CTkTextbox().get() Append extra characters ("\n") to the end after obtaining the content. --- customtkinter/windows/widgets/ctk_textbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customtkinter/windows/widgets/ctk_textbox.py b/customtkinter/windows/widgets/ctk_textbox.py index eeee9ef..0bc73fa 100644 --- a/customtkinter/windows/widgets/ctk_textbox.py +++ b/customtkinter/windows/widgets/ctk_textbox.py @@ -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)