CustomTkinter icon indicating copy to clipboard operation
CustomTkinter copied to clipboard

CTkTextbox .get method returning error

Open BenjaminTGa opened this issue 2 years ago • 1 comments

Hi, I'm using the CTkTextbox in my program and it's returning an error when I try to use the get method to retrieve the text from it. My code looks like this:

global mainText
mainText = customtkinter.CTkTextbox(master=self, width=500, height=500, font=("arial", 14))
#lots of code later...
textToCopy = mainText.get(index1=1, index2=10)
pyperclip.copy(textToCopy)
print(textToCopy)

I had a peek at #602 and at #378 but they suggest that the CTkTexbox is still under development, but these questions were a while age and I'm not sure if I can use these methods yet, or if I'm making a mistake with the syntax. Thanks!

BenjaminTGa avatar Jan 16 '23 00:01 BenjaminTGa

use index1=1.0, index2=10.0

M4hbod avatar Jan 18 '23 10:01 M4hbod

Ok, thanks!

BenjaminTGa avatar Jan 19 '23 21:01 BenjaminTGa