title: hide and show frame in tcl tk gui
body: <p>I want to make a frame that can be hidden and shown alternatively. The problem is Tk does not provide any hide/unpack command. I use vtcl and there is an option "Window hode" which only hides the window at top level. Now I want to hide a frame and later show the same frame again. It can be thought of as unpacking one frame and showing the other. My code can be like this:</p>
  
  <pre><code>proc show1hide2 { } {
      global i top
      if {$i == 1} {
          unpack $top.frame1
          pack $top.frame2
          set i 0
      } else {
          unpack $top.frame2
          pack $top.frame1
          set i 1
      }
  }
  </code></pre>
  
  <p>In this procedure, <code>$top.frame1</code> and <code>$top.frame2</code> were previously filled and value of <code>$i</code> is toggled hence <code>$top.frame1</code> and <code>$top.frame2</code> are shown alternatively when this proc is called. All, I want to know is that does there exists and command like <code>unpack</code> which can help me do this? By the way, <code>unpack</code> here is just an idea.</p>