ペインウィンドウを使用する場合は、フレームを削除し、新しいフレームを追加してフレームを置き換えることで、コンテンツペインを切り替えることができるはずです。ttk :: panedwindowのおよび/コマンドの説明については、このマニュアルページを参照してください。forget
add
insert
サンプルコード:
package require Ttk
# Create a panedwindow
ttk::frame .f
ttk::panedwindow .f.pane -orient vertical
# Create three panes
ttk::frame .f.pane.one -height 50 -width 50
ttk::label .f.pane.one.l -text "Number one"
pack .f.pane.one.l
ttk::frame .f.pane.two -height 50 -width 50
ttk::label .f.pane.two.l -text "Number two"
pack .f.pane.two.l
ttk::frame .f.pane.three -height 50 -width 50
ttk::label .f.pane.three.l -text "Number three"
pack .f.pane.three.l
# Add frames one and two to the panedwindow
.f.pane add .f.pane.one
.f.pane add .f.pane.two
pack .f.pane -expand 1 -fill both
pack .f -expand 1 -fill both
# Replace pane one with pane three
.f.pane insert 1 .f.pane.three
.f.pane forget 2
このコードは、自分のニーズに合わせて調整できます。必要になる可能性のあるすべてのビューを作成し、必要に応じてそれらを入れ替えるだけです。