On 16 May 2007 03:32:32 -0700, Mark Tarver <email@example.com>
The trailing newline that ALWAYS exists at the end of the
>I recently created an empty textbox and wanted to find what TCL
>thought was in it.
>I used these commands
>% text .t
>% pack .t
>% .t get 1.0 end
>% set x [.t get 1.0 end]
>% puts [string length $x]
>What is in x exactly?
contents of any textbox, try as you might to get rid of it.
I'm sure there is a perfectly good reason for this, but
I have to confess that I find it to be an accursed nuisance.
It's easy to deal with it when you know it's there...
set x [.t get 1.0 end-1c]
Jonathan Bromley, Consultant
DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services
Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.