method find_view_container gv =
      let find_in_child = function
          None -> None
        | Some (`Notebook gn) ->
            gn#find_view_container gv
        | Some (`Paned gp) ->
            gp#find_view_container gv
        | Some (`View v) ->
            if Oo.id v = Oo.id gv then
              Some (`Paned (self :> gui_paned))
            else
              None
      in
      match find_in_child child1 with
        None -> find_in_child child2
      | Some x -> Some x