LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   TKinter text widget clear (https://www.linuxquestions.org/questions/linux-newbie-8/tkinter-text-widget-clear-875678/)

rockharley 04-18-2011 12:31 PM

TKinter text widget clear
 
hello, i have written some code to analyze some data and then write a text file containing the results. i then display the text file in a text widget. problem is that i want to clear the contents of the text widget upon the initiation of a run, so that old data is not still displayed before the new results become available. i cannot get the widget to clear during a run any suggestions?

smallpond 04-18-2011 02:39 PM

Tkinter is an interface to tcl/tk. The Tk to clear a Text widget is "delete 1.0 end"

rockharley 04-19-2011 12:34 PM

Thanks. I tried that as a line of code in my file and it gave me a syntax error. any suggestions?

rockharley 04-20-2011 11:28 AM

Could someone tell me how to clear the text widget as described above?

JackeyKing 08-15-2012 08:50 PM

Quote:

Originally Posted by rockharley (Post 4330642)
Could someone tell me how to clear the text widget as described above?

Text.delete(1.0, Tkinter.END) can totally clear the text


All times are GMT -5. The time now is 01:23 PM.