Clearing a Text Widget
Eric Brunel
eric_brunel at despammed.com
Mon Jul 25 03:32:03 EDT 2005
On Fri, 22 Jul 2005 23:42:52 -0400, Kane Bonnette <gtg216r at mail.gatech.edu> wrote:
> Kane Bonnette wrote:
>> Does anyone know how the clear the text from a Tkinter Text Widget? The
>> delete(0, END) trick that works for Entry widgets doesn't work for Text
>>
>> I get "0 is an invalid index" when i try to do so
>>
>> Thanks in advance
>
> In case anyone's wondering, you must use 0.0 instead of 0 on a Text Widget
In fact, you should use 1.0, which means line 1, column 0 (lines are numbered from 1 in text widgets).
HTH
--
python -c "print ''.join([chr(154 - ord(c)) for c in 'U(17zX(%,5.zmz5(17;8(%,5.Z65\'*9--56l7+-'])"
More information about the Python-list
mailing list