LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-18-2011, 12:31 PM   #1
rockharley
LQ Newbie
 
Registered: Apr 2011
Posts: 3

Rep: Reputation: 0
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?
 
Old 04-18-2011, 02:39 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,153

Rep: Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265
Tkinter is an interface to tcl/tk. The Tk to clear a Text widget is "delete 1.0 end"
 
Old 04-19-2011, 12:34 PM   #3
rockharley
LQ Newbie
 
Registered: Apr 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks. I tried that as a line of code in my file and it gave me a syntax error. any suggestions?
 
Old 04-20-2011, 11:28 AM   #4
rockharley
LQ Newbie
 
Registered: Apr 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Could someone tell me how to clear the text widget as described above?
 
Old 08-15-2012, 08:50 PM   #5
JackeyKing
LQ Newbie
 
Registered: Aug 2012
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by rockharley View Post
Could someone tell me how to clear the text widget as described above?
Text.delete(1.0, Tkinter.END) can totally clear the text
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
basic python entry tkinter widget how-to donnied Programming 2 03-30-2008 10:36 AM
A good simple text display widget in GTK (not Label) vharishankar Programming 3 05-18-2006 05:44 AM
Tcl/Tk: Set Value of Text Widget Kenji Miyamoto Programming 1 06-26-2005 08:53 PM
Rich Text Widget/Database Front End Stranger Programming 5 10-03-2004 06:37 PM
GUI test tool to perform widget functions via a text file liguorir Linux - Software 0 01-05-2004 02:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration