Apr-06-2020, 11:18 PM
Quote:Hi Joe_momma, I have checked the code that you posted and I have adapted it to my needs however it is not yet working. The problem I am facing is trying to read the data that is loaded into the Text widget. When I ran my code with the adapted portion of your code I get the following error:Please keep this to your original post-
Error:
Traceback (most recent call last):
File "C:\Users\ve3je\AppData\Local\Programs\Python\Python37\lib\tkinter\__init__.py", line 1705, in __call__
return self.func(*args)
File "C:\Users\ve3je\Documents\Python Projects\PBSnippet\PBSnippet-5 Cat Mod.py", line 83, in highlight
defs= Code_Snippet() #feed entry to dictionary
TypeError: 'Text' object is not callable
in your first post you declare code_snippet as a text widget
Quote:Code_Snippet = Text(root, bg = '#FFFFDF', fg='#000000', bd=0, width=117, height=27, relief=SUNKEN, cursor='hand2')in your error defs= code_snippet() code_snippet is a widget not a function that's why your getting an error, post your code or at least a workable section- when i said you are missing the step insert you should have a line that looks like this
Code_Snippet.insert('end','some-text','search') #(location, text or entry, tag)