let textbox_handlers_in_pos (wr: win_ref) (pos: int) (b: b)
  : (node_ref * rslt list) option =
    assert (win_valid wr b);
    begin match
      (page_assoc_valid (win_assoc_valid wr b).win_page b).page_document
    with
    | None -> None
    | Some(root) ->
        begin try
          Some(List.nth (textbox_handlers_in_tree root b) pos)
        with
        | Failure("nth"-> None
        end
    end