| Description: |
ScrolledWindow should be more robust, when the managed
widget is destroyed, like it was for BWidget 1.5.
Application background:
-----------------------
(1) After creating a ScrolledWindows $sw it has no
widget and displays a gray background.
(2) After assigning a widget [$sw setwidget $w] it
manages the widget $w.
(3) With 1.6 's not possible anymore to return to state
(1).
With BWidget 1.5 it was possible to destroy the widget $w.
But BWidget 1.6 fails to display anything even after a
fresh
[$sw setwidget ...].
It would also be nice to have a
$sw setwidget {}
making the ScrolledWindow $sw manage no widget.
Script illustrating the problem
(runs with 1.5, fails with 1.6):
-----------------------------
catch {console show}
package require -exact BWidget 1.6
set sw [ScrolledWindow .sw -scrollbar both -auto both]
pack $sw -fill both -expand yes
wm geometry . 400x600
for {set i 0} {$i < 2} {incr i} {
text .text$i
.text$i insert end [string repeat "This is text
window $i\n" 5]
}
puts "The ScrolledWindow has no widget"
after 3000 {$sw setwidget .text0; puts "Set widget 0"}
after 6000 {destroy .text0; puts "Destroy widget 0"}
after 9000 {$sw setwidget .text1; puts "Set widget 1"}
|