text-Widget and scrolbar
Hello,
I found the following problem/bug on windows tk8.4.11:
If i run the folowing script, the scrollbar isn't shown. I have to
enter the text-Widget and move the cursor out of the visible part of the text to get
the scrollbar.
--------------------------------------------------------
text .t -height 5
scrollbar .s
grid .t -row 0 -column 0
grid .s -row 0 -column 1 -stick nesw
..t configure -yscrollcommand[list .s set]
..s configure -command[list .t yview]
update
wm withdraw .
..t insert 1.0 "1\n2\n3\n4\n5\n6\n7\n8\n9\n0\n"
wm deiconify .
------------------------------------------------------------
As I found out this always happens when text is inserted into an unvisible (withdrawn) text-widget.
This isn't happening on 8.4.11/linux.
The solution i found is to add a binding:
bind .t <Visibility> { eval [%W cget -yscrollcommand] [%W yview] }
Any other Ideas?
Matthias
--
_______________________________________________
Matthias Meier
Fornoff und Heintzenberg GmbH
Consulting, DV-Systeme, Dienstleistungen
Hauptstr. 4, D-79224 Umkirch
Tel +49 7665 937-0, Fax -150
|