proc create_top {} {

  button .b -text "Push" -command {
    create_child
  }
  pack .b

  grab -global .

}

proc create_child {} {

  toplevel .c
  button .c.b -text "Push again" -command {
    create_grandchild
    destroy .c
  }
  pack .c.b

}

proc create_grandchild  {} {

  toplevel .gc
  label .gc.l -text "Move the cursor over me a few times..."
  pack .gc.l

}

create_top
