two...@gmail.com wrote:
> I took yours but just made the entry text bigger, and it does not
> autosize to fit. Maybe it's something with the text entry???
>
You can achieve the requested result by creating a label for each
entry and configure it with the same font and text variable. Pack
the labels, so they will influence the size of the toplevel. Then
place the entry on top of the label. Add some padding to the labels
to account for the border and highlight ring of the entry. Like
this:
for {set n 0} {$n < 5} {incr n} {
set myvar$n \
"hello world 1111111111111 22222222222222 333333333333"
label .tl$n -textvariable myvar$n -font {courier 12} \
-padx 3 -pady 3
entry .te$n -textvariable myvar$n -font {courier 12}
pack .tl$n -fill both -expand true -padx 10 -pady 5
place .te$n -in .tl$n -relwidth 1 -relheight 1
}
Note: This will fail miserably if you put newlines or tabs into the
variables.
Schelte.