From: Andy C. <an...@ac...> - 2006-05-21 13:33:42
|
Using grid forget and then grid to unmanage one and then manage another widget (like in a tabbed UI), doesn't refresh the new widgets. It works once but then there's no visual change. Clicking or resizing the window refreshes the widgets - the new widgets are there but haven't been = redrawn. The following example should illustrate this. (Using core-8-4-branch, OS X 10.4, Intel Mac Mini) I think this is a bug but is there a command to force a widget hierarchy = to refresh that I can use as a quick fix? Andy ---- frame .buttonframe frame .switchframe=20 pack .buttonframe .switchframe -side top button .buttonframe.b1 -text "show 1" -command { grid forget = .switchframe.l2 ; grid .switchframe.l1 };=20 button .buttonframe.b2 -text "show 2" -command { grid forget = .switchframe.l1 ; grid .switchframe.l2 };=20 pack .buttonframe.b1 .buttonframe.b2 -side left # two frames which will be managed/unmanaged by grid frame .switchframe.l1 -bg red button .switchframe.l1.la -text "Hello 1" label .switchframe.l1.laa -text "1" -bg red grid .switchframe.l1.la .switchframe.l1.laa=20 frame .switchframe.l2 -bg blue=20 button .switchframe.l2.lb -text "Hello 2"=20 label .switchframe.l2.lbb -text "2" -bg blue grid .switchframe.l2.lb .switchframe.l2.lbb # set frame 1 as the currently visible grid .switchframe.l1 --- |