> This was the old-fashioned way. These days we have a special mechanism
>
> for that: wm forget& wm manage, which transforms toplevels into frames
>
> you can pack/grid and vice versa. Chcek toolbar.tcl in the Tk demos for
>
> an example.
>
>
>
> Christian
Thank you Christian for your reply.
my use case way beyond this. i am trying to dock/undock notbook tabs from one notebook to other notebook.
e.g:
toplevel .top
ttk::notebook .top.nb1
.top.nb1 add [frame .top.nb1.tab1 -container true]
.top.nb1 add [frame .top.nb1.tab2 -container true]
# now i would like to embed toplevels in to the tab1 frame
toplevel .tab1 -use [winfo id .top.nb1.tab1]
toplevel .tab2 -use [winfo id .top.nb1.tab2]
#notebook2
ttk::notebook .top.nb2
.top.nb2 add [frame .top.nb2.tab1 -container true]
.top.nb2 add [frame .top.nb2.tab2 -container true]
# now i would like to embed toplevels in to the tab frames
toplevel .tab3 -use [winfo id .top.nb2.tab1]
toplevel .tab4 -use [winfo id .top.nb2.tab2]
# now i can move the toplevels between the tabs by using - use options
for e.g. to move .tab1 to notebook2 i simply create new tab in note book and embed the toplevel in to it.
.top.nb2 add [frame .top.nb2.tab3 -container true]
.tab1 configure -use [winfo id .top.nb2.tab3]
by doing this we can dock/undock the notebok tab contents between the notebooks without recreating the contents.
this works fine on Windows. on Linux -use options ca't be modified after creation.
Is there any alternate/better solution for this?
Thanks,
Madan