Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > text-Widget and scrolbar
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 1st April 08:31
matthias meier
External User
 
Posts: 1
Default 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
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666