Calling ScrolledWindow::setwidget does not make the widget intended to be scrolled visible since ScrolledWindow::setwindow method lacks a raise:
toplevel .t
text .t.t -width 10 -height 4;
.t.t insert end {z1
z2
z3
z4
z5
z6
z7
z8
z9
z10}
ScrolledWindow::create .t.s -auto none;
pack .t.s -fill both -expand 1;
.t.s setwidget .t.t
does not show the text widget. Adding a raise command after gridding the widget into the scrolledwindow works fine:
grid $widget -in $path -row 1 -column 1 -sticky news
raise $widget;
ATTENTION:
- method getwidget would be fine
- support to remove a widget from a scrolledwindow would be fine (setwidget "")
|