[Tutor] Text Box

Rick Pasotto rick@niof.net
Thu, 29 Mar 2001 09:09:58 -0500


On Thu, Mar 29, 2001 at 06:38:34AM -0500, Corey Woodworth wrote:
> What is the easist well to tell if a text widget is empty? I tried all
> different solutions including:
> 
> if textwidget.get(1.0,END) == "":
> 
> if textwidget.get(1.0) == textwidget.get(END):
> 
> if textwidget.compare(1.0,END):
> 
> I'm sure some of those weren't even valid. :) What am I doin' wrong?

I believe a Text widget is never really empty. It always contains at
least a newline. Check for a length of 1.

-- 
"I will not be pushed, filed, stamped, indexed, briefed, debriefed, or
numbered.  My life is my own."
		-- The Prisoner
		   Rick Pasotto email: rickp@telocity.com