clearing text on canvas

devnew at gmail.com devnew at gmail.com
Tue Dec 18 12:08:07 EST 2007


hi
i am new to  tkinter and would like some help with canvas

i am doing  validation of contents of a folder  and need to show the
ok/error messages on a canvas

resultdisplay =Canvas(...)
errmessage="error!"
okmessage="dir validation ok!"

if dirvalidate is False:
resultdisplay.create_text(1,50,anchor=W,text=errmessage,width=175)

else:
self.resultdisplay.create_text(1,50,anchor=W,text=okmessage,width=175)


my problem is that if validation succeeds or fails the text created on
canvas is displayed over the previous created text
I need to clear the previous text from the canvas before creating new
text
can someone help?
dn




More information about the Python-list mailing list