次のコードは正常に動作します。panedwindow
上に青いボックス、下に緑のボックスがある が表示されます。
panedwindow .root -orient vertical -showhandle true -background red
frame .top -background blue -width 100 -height 100
frame .bot -background green -width 100 -height 100
.root add .top .bot
pack .root -expand true -fill both
ただし、panedwindow
コマンドを下に移動すると、動作が停止します。上部の青いボックスは表示されていません。代わりに、それ自体の赤panedwindow
が透けて見えます。
frame .top -background blue -width 100 -height 100
panedwindow .root -orient vertical -showhandle true -background red
frame .bot -background green -width 100 -height 100
.root add .top .bot
pack .root -expand true -fill both
なぜこれが起こるのですか?panedwindow
それ以降に作成されたウィジェットのみを管理できますか? パッカーで同様の動作を見たことがあります。パッカーは、-in
後で追加されたウィジェット ウィジェットをパックすることを拒否します。